def parse_extra_model_fields(extra_model_fields):
 fields = defaultdict(list)
 for entry in extra_model_fields:
  (model_key, field_name) = parse_field_path(entry[0])
  field_class = import_field(entry[1])
  (field_args, field_kwargs) = entry[2:]
  try:
   field = field_class(*field_args, **field_kwargs)
  except TypeError as e:
   raise ImproperlyConfigured((u"The EXTRA_MODEL_FIELDS setting contains arguments for the field '%s' which could not be applied: %s" % (entry[1], e)))
  fields[model_key].append((field_name, field))
 return fields

def parse_extra_model_fields ( extra_model_fields ) : fields = defaultdict ( list ) for entry in extra_model_fields : ( model_key , field_name ) = parse_field_path ( entry [ 0 ] ) field_class = import_field ( entry [ 1 ] ) ( field_args , field_kwargs ) = entry [ 2 : ] try : field = field_class ( * field_args , ** field_kwargs ) except TypeError as e : raise ImproperlyConfigured ( ( u"The EXTRA_MODEL_FIELDS setting contains arguments for the field '%s' which could not be applied: %s" % ( entry [ 1 ] , e ) ) ) fields [ model_key ] . append ( ( field_name , field ) ) return fields
parses the value of extra_model_fields .