code: def create(self, *args, **kwargs):
      serializer = self.get_serializer(
          data=self.request.data, partial=True
      )
      serializer.is_valid(raise_exception=True)
      user = serializer.save()
      token = user.auth_token.key
  
      # Check if its an invite
      invite = self.request.data.get("invite_token", None)
      if invite and invite != "undefined":
          iid = force_text(urlsafe_base64_decode(invite))
          invite_object = Invitation.objects.get(pk=iid)
          try:
              Membership.objects.get(
                  project=invite_object.project, user=user
              )
          except Membership.DoesNotExist:
              Membership.objects.create(
                  project=invite_object.project, user=user
              )
  
      return Response({"token": token})
  
imports: from rest_framework import status, viewsets
  from rest_framework.response import Response
  from modelchimp.serializers.profile import ProfileSerializer
  from modelchimp.models.profile import Profile
  from modelchimp.models.user import User
  from modelchimp.models.invitation import Invitation
  from modelchimp.models.membership import Membership
  from modelchimp.serializers.user import UserSerializer
  from rest_framework.permissions import IsAuthenticated
  from rest_auth.views import PasswordResetConfirmView
  from django.utils.encoding import force_text
  from django.utils.http import urlsafe_base64_decode
label_desc: Use image node_id 1 for calling the RegisterAPI obj's underlying member method code with example usage: obj.create() and returns: Response