def remove_indentation()

in utils/convert_doc_to_notebooks.py [0:0]


def remove_indentation(text):
    """ Remove the indendation found in the first line in text."""
    lines = text.split("\n")
    indent = _re_indent.search(lines[0]).groups()[0]
    new_lines = [line[len(indent):] for line in lines]
    return "\n".join(new_lines)