<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dedent(lines):
 """De-indent based on the first line's indentation."""

    if len(lines) != 0:
        first_lstrip = lines[0].lstrip()
        strip_len = len(lines[0]) - len(first_lstrip)
        for line in lines:
            if len(line[:strip_len].strip()) != 0:
                raise ValueError('less indentation than first line: ' +
                                 line)
            else:
                yield line[strip_len:]