code: def get_database(database_type: str = "mysql") -> BaseDatabase:
      """
      Given a database type it returns a database instance for that type.
  
      :param database_type: type of the database.
      :return: an instance of BaseDatabase depending on given database_type.
      """
      try:
          path, db_class_name = DATABASES[database_type]
          db_module = importlib.import_module(path)
          db_class = getattr(db_module, db_class_name)
          return db_class
      except (ImportError, KeyError):
          raise TypeError("Unsupported database type supplied.")
  
imports: import abc
  import importlib
  from typing import Dict, List, Tuple
  from dejavu.config.settings import DATABASES
label_desc: Use image node_id 1 for calling a global function with example usage: get_database(database_type) and returns: db_class