code: def _on_message(self, chat_memory, message: ChatBotMessage):
      # add question to history
      # TODO move it to realtime pooling
      chat_memory.add_to_history(message)
  
      logger.debug(
          f">>chatbot {chat_memory.chat_id} in: {message.text}"
      )
  
      # process
      bot_executor = self.bot_executor_cls(self, chat_memory)
      response_text = bot_executor.process()
  
      chat_id = chat_memory.chat_id
      bot_username = self.bot_params["bot_username"]
      response_message = ChatBotMessage(
          ChatBotMessage.Type.DIRECT,
          response_text,
          # In Slack direct messages are treated as channels themselves.
          user=bot_username,
          destination=chat_id,
          sent_at=dt.datetime.now(),
      )
  
      # send to chat adapter
      self.chat_pooling.send_message(response_message)
      logger.debug(f">>chatbot {chat_id} out: {response_message.text}")
  
      # send to history
      chat_memory.add_to_history(response_message)
  
file_path: mindsdb/mindsdb/interfaces/chatbot/chatbot_task.py
imports: import traceback
  import datetime
  from mindsdb.integrations.libs.api_handler import APIChatHandler
  from mindsdb.api.executor.controllers.session_controller import SessionController
  from mindsdb.interfaces.storage import db
  from mindsdb.interfaces.tasks.task import BaseTask
  from mindsdb.utilities import log
  from .polling import MessageCountPolling, RealtimePolling
  from .memory import DBMemory, HandlerMemory
  from .chatbot_executor import MultiModeBotExecutor, BotExecutor
  from .types import ChatBotMessage
label_desc: Use image node_id 4 for calling the ChatBotTask obj's underlying member method code with example usage: obj._on_message(chat_memory, message) without return types