<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def model_field_attr(model, model_field, attr):
 """ Returns the specified attribute for the specified field on the model class. """

    fields = dict([(field.name, field) for field in model._meta.fields])
    return getattr(fields[model_field], attr)