code: def check_data_source_and_table_are_valid(
      catalog: CatalogManager, database_name: str, table_name: str
  ):
      """
      Validate the database is valid and the requested table in database is
      also valid.
      """
      error = None
      if catalog.get_database_catalog_entry(database_name) is None:
          error = "{} data source does not exist. Create the new database source using CREATE DATABASE.".format(
              database_name,
          )
  
      if not catalog.check_table_exists(table_name, database_name):
          error = "Table {} does not exist in data source {}. Create the table using native query.".format(
              table_name,
              database_name,
          )
  
      if error:
          logger.error(error)
          raise BinderError(error)
  
imports: from __future__ import annotations
  import re
  from typing import TYPE_CHECKING, List
  import pandas
  from evadb.catalog.catalog_type import ColumnType, TableType
  from evadb.catalog.catalog_utils import get_video_table_column_definitions, is_document_table, is_pdf_table, is_string_col, is_video_table
  from evadb.catalog.models.column_catalog import ColumnCatalogEntry
  from evadb.catalog.models.table_catalog import TableCatalogEntry
  from evadb.catalog.sql_config import IDENTIFIER_COLUMN
  from evadb.catalog.sql_config import ROW_NUM_COLUMN
  from evadb.expression.abstract_expression import AbstractExpression, ExpressionType
  from evadb.expression.function_expression import FunctionExpression
  from evadb.expression.tuple_value_expression import TupleValueExpression
  from evadb.parser.alias import Alias
  from evadb.parser.create_statement import ColumnDefinition
  from evadb.parser.table_ref import TableInfo, TableRef
  from evadb.third_party.databases.interface import get_database_handler
  from evadb.utils.logging_manager import logger
label_desc: Use image node_id 1 for calling a global function with example usage: check_data_source_and_table_are_valid(catalog, database_name, table_name) without return types