code: def _flatten(self, field, items, transform = None):
  		
  		
  		# Retrieve the value for each item in the iterable
  		values = [item[field] for item in items]
  		
  		# Flatten any nested lists
  		flattened = []
  		for value in values:
  			flattened.extend([value] if isinstance(value, str) else value)
  		
  		# Apply any supplied transformation function
  		return transform(flattened) if transform != None else flattened
docs: Extracts the entry `field` from each item in the supplied iterable, flattening any nested lists