code: def yield_rows(adapter):
      '''Yield a dataset catalog line by line'''
      csvfile = StringIO()
      writer = get_writer(csvfile)
      # Generate header
      writer.writerow(adapter.header())
      yield csvfile.getvalue()
      del csvfile
  
      for row in adapter.rows():
          csvfile = StringIO()
          writer = get_writer(csvfile)
          writer.writerow(row)
          yield csvfile.getvalue()
          del csvfilf yield_rows(adapter):
      '''Yield a dataset catalog line by line'''
      csvfile = StringIO()
      writer = get_writer(csvfile)
      # Generate header
      writer.writerow(adapter.header())
      yield csvfile.getvalue()
      del csvfile
  
      for row in adapter.rows():
          csvfile = StringIO()
          writer = get_writer(csvfile)
          writer.writerow(row)
          yield csvfile.getvalue()
          del csvfile
docs: Yield a dataset catalog line by line