code: def pad_chunk_columns(chunk):
      
      columns = set()
      for record in chunk:
          columns.update(record.keys())
      for record in chunk:
          for column in columns:
              record.setdefault(column, None)
      return chunk
docs: Given a set of items to be inserted, make sure they all have the
      same columns by padding columns with None if they are missing.