docs: def get_lines(filename: str) -> Iterator[str]:
      """Create an iterator that returns the lines of a utf-8 encoded file."""
      if filename.endswith('.gz'):
          with gzip.open(filename, 'r') as f:
              for line in f:
                  yield line.decode('utf-8')
      else:
          with open(filename, 'r', encoding='utf-8') as f:
              for line in f:
                  yield line