<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def auto_undent(string):
 """ Unindent a docstring. """

    lines = string.splitlines()
    while lines[0].strip() == "":
        lines = lines[1:]
        if not lines:
            return []
    spaces = len(lines[0]) - len(lines[0].lstrip(" "))
    out = []
    for line in lines:
        num_spaces = len(line) - len(line.lstrip(" "))
        out.append(line[min(spaces, num_spaces) :])
    return out