import textwrap


def dedent(str):
    """Dedent a block of non code."""
    str = textwrap.dedent(str)
    lines = str.splitlines(True)
    for i, line in enumerate(lines):
        if line.strip():
            lines[i] = textwrap.dedent(line)
            break
    return "".join(lines)