code: def _tables_row_to_obj(table_row: TablesRow) -> Dict:
      type = table_row.TABLE_TYPE.lower()
      if table_row.TABLE_TYPE == "BASE TABLE":
          type = "data"
      return {"name": table_row.TABLE_NAME, "type": type}
  
imports: from http import HTTPStatus
  from sqlalchemy.exc import NoResultFound
  from typing import Dict
  from flask import request
  from flask_restx import Resource, abort
  from mindsdb.api.http.namespaces.configs.databases import ns_conf
  from mindsdb.api.mysql.mysql_proxy.classes.fake_mysql_proxy import FakeMysqlProxy
  from mindsdb.api.executor.controllers.session_controller import SessionController
  from mindsdb.api.executor.datahub.classes.tables_row import TablesRow
  from mindsdb.api.executor.data_types.response_type import RESPONSE_TYPE
  from mindsdb_sql import parse_sql, ParsingException
  from mindsdb_sql.parser.ast import CreateTable, DropTables
label_desc: Use image node_id 1 for calling a global function with example usage: _tables_row_to_obj(table_row) and returns: dict