code: def message_to_dataframe_row(message: dict):
      message["id"] = message["_id"]
      message["room_id"] = message["rid"]
      message["text"] = message["msg"]
      message["sent_at"] = message["ts"]
  
      if "u" in message:
          if "username" in message["u"]:
              message["username"] = message["u"]["username"]
          if "name" in message["u"]:
              message["name"] = message["u"]["name"]
      if "bot" in message and "i" in message["bot"]:
          message["bot_id"] = message["bot"]["i"]
      return message
  
imports: from typing import List
  import pandas
  from mindsdb.integrations.libs.api_handler import APITable
  from mindsdb.integrations.utilities.sql_utils import conditions_to_filter, project_dataframe, sort_dataframe
  from mindsdb_sql.parser import ast
label_desc: Use image node_id 1 for calling a global function with example usage: message_to_dataframe_row(message) and returns: message