parameters: (message_id: int, user_id: int)
return_statement: return message
docstring: Gets the specified message
docstring_summary: Gets the specified message
docstring_tokens: Gets the specified message
function: def get_message(message_id: int, user_id: int) -> Message:
          """ Gets the specified message """
          message = Message.query.get(message_id)
  
          if message is None:
              raise NotFound()
  
          if message.to_user_id != int(user_id):
              raise MessageServiceError(
                  f"User {user_id} attempting to access another users message {message_id}"
              )
  
          return message
function_tokens: def get_message ( message_id : int , user_id : int ) -> Message : message = Message . query . get ( message_id ) if message is None : raise NotFound ( ) if message . to_user_id != int ( user_id ) : raise MessageServiceError ( f"User {user_id} attempting to access another users message {message_id}" ) return message