Injects custom fields onto the given sender model as defined
    by the ``EXTRA_MODEL_FIELDS`` setting. This is a closure over
    the "fields" variable.

def add_extra_model_fields(sender, **kwargs):
    """
    Injects custom fields onto the given sender model as defined
    by the ``EXTRA_MODEL_FIELDS`` setting. This is a closure over
    the "fields" variable.
    """
    model_key = sender._meta.app_label, sender._meta.model_name
    for field_name, field in fields.get(model_key, {}):
        field.contribute_to_class(sender, field_name)