Check if a user has marked an instance's workshift type as preferred.

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