<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_profile_user_fieldname(profile_model=None, user_model=None):
 """ Returns the name of the first field on the profile model that points to the ``auth.User`` model. """

    Profile = profile_model or get_profile_model()
    User = user_model or get_user_model()
    for field in Profile._meta.fields:
        if field.rel and field.rel.to == User:
            return field.name
    raise ImproperlyConfigured("Value for ACCOUNTS_PROFILE_MODEL does not "
                               "contain a ForeignKey field for auth.User: %s"
                               % Profile.__name__)