code: def get_last_message(self, chat_memory):
      # retrive from history
      history = chat_memory.get_history()
      last_message = history[-1]
      if last_message.user == self.chat_task.bot_params["bot_username"]:
          # the last message is from bot
          return
      return last_message
  
imports: import time
  from mindsdb_sql.parser.ast import Identifier, Select, Insert
  from mindsdb.utilities import log
  from mindsdb.utilities.context import context
  from .types import ChatBotMessage, BotException
label_desc: Use image node_id 3 for calling the MessageCountPolling obj's underlying member method code with example usage: obj.get_last_message(chat_memory) and returns: last_message