code: def dedent(lines):
      
      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:]
docs: De-indent based on the first line's indentation.