class_docstr: Can't modify signature, as LangChain does a Pydantic check.
class_docstr_tok: ["Ca","n't","modify","signature",",","as","LangChain","does","a","Pydantic","check","."]
code: def get_usable_table_names(self) -> Iterable[str]:
      if self._tables_to_include:
          return self._tables_to_include
  
      original_db = self._engine.session.database
      ret = self._call_engine(["show databases;"])
      dbs = [
          lst[0] for lst in ret.data if lst[0] != "information_schema"
      ]
      usable_tables = []
      for db in dbs:
          if db != "mindsdb":
              try:
                  ret = self._call_engine(
                      [f"use `{db}`;", "show tables;"]
                  )
                  tables = [
                      lst[0]
                      for lst in ret.data
                      if lst[0] != "information_schema"
                  ]
                  for table in tables:
                      table_name = f"{db}.{table}"
                      if table_name not in self._tables_to_ignore:
                          usable_tables.append(table_name)
              except Exception as e:
                  logger.warning(
                      "Unable to get tables for %s: %s", db, str(e)
                  )
              finally:
                  _ = self._call_engine([f"use {original_db};"])
      return usable_tables
  
file_path: mindsdb/mindsdb/integrations/handlers/langchain_handler/mindsdb_database_agent.py
imports: import warnings
  from typing import Iterable, List, Optional
  from mindsdb_sql import parse_sql
  from langchain.sql_database import SQLDatabase
  from mindsdb.utilities import log
label_desc: Use image node_id 4 for calling the MindsDBSQL obj's underlying member method code with example usage: obj.get_usable_table_names() and returns: usable_tables, self