<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _is_preferred(instance, profile):
 """ Check if a user has marked an instance's workshift type as preferred. """

    if not instance.weekly_workshift:
        return False
    if profile and profile.ratings.filter(
            workshift_type=instance.weekly_workshift.workshift_type,
            rating=WorkshiftRating.LIKE,
    ).count() == 0:
        return False
    return True