class_docstr: The Microsoft Teams Chat Messages Table implementation.
class_docstr_tok: ["The","Microsoft","Teams","Chat","Messages","Table","implementation","."]
docstr: Calls the API client to get the messages from the Microsoft Graph API.
  If all parameters are None, it will return all the messages from all the chats.
  If only the chat_id is given, it will return all the messages from that chat.
  
  Parameters
  ----------
  chat_id: Text
      The chat id to get the messages from.
  
  message_id: Text
      The message id to get the message from.
  
  Returns
  -------
  List[Dict[Text, Any]]
      The messages from the Microsoft Graph API.
docstr_tok: ["Calls","the","API","client","to","get","the","messages","from","the","Microsoft","Graph","API",".","If","all","parameters","are","None",",","it","will","return","all","the","messages","from","all","the","chats",".","If","only","the","chat_id","is","given",",","it","will","return","all","the","messages","from","that","chat",".","Parameters","--","--","--","--","--","chat_id",":","Text","The","chat","id","to","get","the","messages","from",".","message_id",":","Text","The","message","id","to","get","the","message","from",".","Returns","--","--","--","-","List","[","Dict","[","Text",",","Any","]","]","The","messages","from","the","Microsoft","Graph","API","."]
code: def get_messages(
      self, chat_id: Text = None, message_id: Text = None
  ) -> List[Dict[Text, Any]]:
      """
      Calls the API client to get the messages from the Microsoft Graph API.
      If all parameters are None, it will return all the messages from all the chats.
      If only the chat_id is given, it will return all the messages from that chat.
  
      Parameters
      ----------
      chat_id: Text
          The chat id to get the messages from.
  
      message_id: Text
          The message id to get the message from.
  
      Returns
      -------
      List[Dict[Text, Any]]
          The messages from the Microsoft Graph API.
      """
  
      api_client = self.handler.connect()
  
      # if both chat_id and message_id are given, get the message with that id from the API
      if message_id and chat_id:
          chat_message = api_client.get_chat_message(
              chat_id, message_id
          )
          # add the missing eventDetail attribute to the chat message
          chat_message["eventDetail"] = {
              "@odata.type": None,
              "visibleHistoryStartDateTime": None,
              "members": None,
              "initiator": {
                  "application": None,
                  "device": None,
                  "user": {
                      "@odata.type": None,
                      "id": None,
                      "displayName": None,
                      "userIdentityType": None,
                      "tenantId": None,
                  },
              },
          }
  
          return [chat_message]
      # if only the chat_id is given, get all the messages from that chat
      elif chat_id:
          return api_client.get_chat_messages(chat_id)
      # if no parameters are given or only the message_id is given, get all the messages from all the chats
      else:
          return api_client.get_all_chat_messages()
  
imports: import pandas
  from typing import Text, List, Dict, Any
  from mindsdb.utilities import log
  from mindsdb_sql.parser import ast
  from mindsdb.integrations.libs.api_handler import APITable
  from mindsdb.integrations.handlers.ms_teams_handler.settings import ms_teams_handler_config
  from mindsdb.integrations.handlers.utilities.query_utilities.insert_query_utilities import INSERTQueryParser
  from mindsdb.integrations.handlers.utilities.query_utilities.select_query_utilities import SELECTQueryParser, SELECTQueryExecutor
label_desc: Use image node_id 2 for calling the ChatMessagesTable obj's underlying member method code with example usage: obj.get_messages(chat_id, message_id) and returns: list, api_client, api_client