def make_plucker(fields):
	"""
	Factory method that will create a filtering function.
	The returned function will accept a dict and return only the fields specified
	in the fields parameter.
	"""
	def filter(record):
		result = {}
		for field in fields:
			if field in record:
				result[field] = record[field]
		return result
	return filter