<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_model():
 """ Returns the yacms profile model, defined in ``settings.ACCOUNTS_PROFILE_MODEL``, or ``None`` if no profile model is configured. """


    if not getattr(settings, "ACCOUNTS_PROFILE_MODEL", None):
        raise ProfileNotConfigured

    try:
        return apps.get_model(settings.ACCOUNTS_PROFILE_MODEL)
    except ValueError:
        raise ImproperlyConfigured("ACCOUNTS_PROFILE_MODEL must be of "
                                   "the form 'app_label.model_name'")
    except LookupError:
        raise ImproperlyConfigured("ACCOUNTS_PROFILE_MODEL refers to "
                                   "model '%s' that has not been installed"
                                   % settings.ACCOUNTS_PROFILE_MODEL)