<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_for_user(user):
 """ Returns site-specific profile for this user. Raises ``ProfileNotConfigured`` if ``settings.ACCOUNTS_PROFILE_MODEL`` is not set, and ``ImproperlyConfigured`` if the corresponding model can't be found. """

    if not hasattr(user, '_yacms_profile'):
        # Raises ProfileNotConfigured if not bool(ACCOUNTS_PROFILE_MODEL)
        profile_model = get_profile_model()
        profile_manager = profile_model._default_manager.using(user._state.db)

        user_field = get_profile_user_fieldname(profile_model, user.__class__)
        profile, created = profile_manager.get_or_create(**{user_field: user})

        profile.user = user
        user._yacms_profile = profile

    return user._yacms_profile