def METHOD_NAME(doc):
    lines = doc.split("\n")
    first_line_indent = -1
    for i in range(0, len(lines)):
        line = lines[i]
        if line.strip() == "":
            continue
        if first_line_indent < 0:
            first_line_indent = len(line) - len(line.lstrip())
        indent = min(len(line) - len(line.lstrip()), first_line_indent)
        lines[i] = lines[i][indent:]
    return "\n".join(lines)