code: def create_token(self, request, refresh_token=False):
          
  
          if callable(self.expires_in):
              expires_in = self.expires_in(request)
          else:
              expires_in = self.expires_in
  
          request.expires_in = expires_in
  
          return self.request_validator.get_jwt_bearer_token(None, None, request)
docs: Create a JWT Token, using requestvalidator method.