code: def _check_membership_with_pid(self, request, pid):
      try:
          Membership.objects.get(user=request.user, project=pid)
      except Membership.DoesNotExist:
          return False
  
      return True
  
imports: from rest_framework.permissions import BasePermission
  from modelchimp.models.membership import Membership
  from modelchimp.models.experiment import Experiment
label_desc: Use image node_id 3 for calling the HasProjectMembership obj's underlying member method code with example usage: obj._check_membership_with_pid(request, pid) and returns: True, False