code: def _parse_statements(lines):
      
      lines = (l.strip() for l in lines if l)
      lines = (l for l in lines if l and not l.startswith('--'))
      parts = []
      for line in lines:
          parts.append(line.rstrip(';'))
          if line.endswith(';'):
              yield '\n'.join(parts)
              parts[:] = []
      if parts:
          yield '\n'.join(parts)
docs: Return a generator of statements
  
      Args: A list of strings that can contain one or more statements.
            Statements are separated using ';' at the end of a line
            Everything after the last ';' will be treated as the last statement.
  
      >>> list(_parse_statements(['select * from ', 't1;', 'select name']))
      ['select * from\\nt1', 'select name']
  
      >>> list(_parse_statements(['select * from t1;', '  ']))
      ['select * from t1']