def __new__(cls, name, bases, attrs):
		try:
			parents = [b for b in bases if issubclass(b, EntityForm)]
		except __HOLE__:
			# We are defining EntityForm itself
			parents = None
		sup = super(EntityFormMetaclass, cls)
		
		if not parents:
			# Then there's no business trying to use proxy fields.
			return sup.__new__(cls, name, bases, attrs)
		
		# Fake a declaration of all proxy fields so they'll be handled correctly.
		opts = ModelFormOptions(attrs.get('Meta', None))
		
		if opts.model:
			formfield_callback = attrs.get('formfield_callback', None)
			proxy_fields = proxy_fields_for_entity_model(opts.model, opts.fields, opts.exclude, opts.widgets, formfield_callback)
		else:
			proxy_fields = {}
		
		new_attrs = proxy_fields.copy()
		new_attrs.update(attrs)
		
		new_class = sup.__new__(cls, name, bases, new_attrs)
		new_class.proxy_fields = proxy_fields
		return new_class
dataset/ETHPy150Open ithinksw/philo/philo/forms/entities.py/EntityFormMetaclass.__new__