code: def has_permission(self, request, view):
      arguments = view.get_renderer_context()["kwargs"]
      project_id = arguments.get("project_id")
      model_id = arguments.get("model_id")
      result = False
  
      if project_id:
          result = self._check_membership_with_pid(request, project_id)
  
      if model_id:
          result = self._check_membership_with_mid(request, model_id)
  
      return result
  
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 1 for calling the HasProjectMembership obj's underlying member method code with example usage: obj.has_permission(request, view) and returns: result