<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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)