code: def _is_preferred(instance, profile):
      
      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
docs: Check if a user has marked an instance's workshift type as preferred.