code: def decode_key(request):
      key = request.data.get("key")
  
      membership_object = Membership.objects.get(key=key)
      project_id = membership_object.project.id
      token = Token.objects.get(user=membership_object.user).key
  
      return Response(
          {
              "project_id": project_id,
              "token": token,
          },
          status=status.HTTP_200_OK,
      )
  
file_path: modelchimp/modelchimp/views/api/project_key.py
imports: from rest_framework import status, viewsets
  from rest_framework.response import Response
  from rest_framework import mixins
  from rest_framework.decorators import api_view, permission_classes, authentication_classes
  from rest_framework.authtoken.models import Token
  from modelchimp.serializers.project_key import ProjectKeySerializer
  from modelchimp.models.membership import Membership
  from modelchimp.api_permissions import HasProjectMembership
  from rest_framework.permissions import IsAuthenticated
label_desc: Use image node_id 1 for calling a global function with example usage: decode_key(request) and returns: Response