code: def get_db_provider(config=None, blocking_auth=True):
      db_provider = get_storage_db_provider()
      if db_provider is not None:
          return db_provider
  
      if config is None:
          config = get_config()
      verbose = parse_verbosity(config.get("verbose", None))
  
      # Save this verbosity level as global for the whole experiment job:
      set_storage_verbose_level(verbose)
  
      logger = logs.get_logger("get_db_provider")
      logger.setLevel(verbose)
      logger.debug("Choosing db provider with config:")
      logger.debug(config)
  
      if "storage" in config.keys():
          artifact_store = get_artifact_store(config["storage"])
      else:
          artifact_store = None
  
      assert "database" in config.keys()
      db_config = config["database"]
      if db_config["type"].lower() == "s3":
          db_provider = S3Provider(
              db_config, blocking_auth=blocking_auth
          )
          if artifact_store is None:
              artifact_store = db_provider.get_storage_handler()
  
      elif db_config["type"].lower() == "gs":
          raise NotImplementedError("GS is not supported.")
  
      elif db_config["type"].lower() == "local":
          db_provider = LocalDbProvider(
              db_config, blocking_auth=blocking_auth
          )
          if artifact_store is None:
              artifact_store = db_provider.get_storage_handler()
  
      else:
          raise ValueError(
              "Unknown type of the database " + db_config["type"]
          )
  
      setup_storage(db_provider, artifact_store)
      return db_provider
  
file_path: studio/studio/db_providers/db_provider_setup.py
imports: import os
  import yaml
  import pyhocon
  from studio.db_providers.local_db_provider import LocalDbProvider
  from studio.db_providers.s3_provider import S3Provider
  from studio.storage.storage_handler import StorageHandler
  from studio.storage.storage_handler_factory import StorageHandlerFactory
  from studio.storage.storage_setup import setup_storage, get_storage_db_provider, set_storage_verbose_level
  from studio.storage.storage_type import StorageType
  from studio.util import logs
  from studio.util.util import parse_verbosity
label_desc: Use image node_id 3 for calling a global function with example usage: get_db_provider(config, blocking_auth) and returns: db_provider, db_provider