code: def _get_models(self, query: ASTNode = None):
      columns = self.information_schema["MODELS"]
      data = []
      for project_name in self.get_projects_names():
          project = self.database_controller.get_project(
              name=project_name
          )
          project_models = project.get_models()
          for row in project_models:
              table_name = row["name"]
              table_meta = row["metadata"]
              if table_meta["active"] is not True:
                  continue
              data.append(
                  [
                      table_name,
                      table_meta["engine"],
                      project_name,
                      table_meta["version"],
                      table_meta["status"],
                      table_meta["accuracy"],
                      table_meta["predict"],
                      table_meta["update_status"],
                      table_meta["mindsdb_version"],
                      table_meta["error"],
                      table_meta["select_data_query"],
                      table_meta["training_options"],
                      table_meta["current_training_phase"],
                      table_meta["total_training_phases"],
                      table_meta["training_phase_name"],
                      table_meta["label"],
                      row["created_at"],
                      table_meta["training_time"],
                  ]
              )
          # TODO optimise here
          # if target_table is not None and target_table != project_name:
          #     continue
  
      df = pd.DataFrame(data, columns=columns)
      return df
  
imports: from functools import partial
  import pandas
  from mindsdb_sql.parser.ast import BinaryOperation, Constant, Identifier, Select, Join, Union, Insert, Delete
  from mindsdb_sql.parser.ast.base import ASTNode
  from mindsdb.api.executor.datahub.classes.tables_row import TABLES_ROW_TYPE, TablesRow
  from mindsdb.api.executor.datahub.datanodes.datanode import DataNode
  from mindsdb.api.executor.datahub.datanodes.integration_datanode import IntegrationDataNode
  from mindsdb.api.executor.datahub.datanodes.project_datanode import ProjectDataNode
  from mindsdb.api.executor import exceptions
  from mindsdb.api.executor.utilities.sql import query_df
  from mindsdb.interfaces.agents.agents_controller import AgentsController
  from mindsdb.interfaces.database.projects import ProjectController
  from mindsdb.interfaces.jobs.jobs_controller import JobsController
  from mindsdb.interfaces.skills.skills_controller import SkillsController
  from mindsdb.utilities import log
label_desc: Use image node_id 19 for calling the InformationSchemaDataNode obj's underlying member method code with example usage: obj._get_models(query) and returns: df