code: def get_db_url(path: str) -> str:
      if os.path.exists(path):
          db_url = f"{DB._DIALECT}:///{path}/{DB._DB_NAME}"
          return db_url
      else:
          raise RuntimeError(
              f"Cannot find database {path}. Please init first."
          )
  
imports: import os
  from collections import defaultdict
  from weakref import WeakValueDictionary
  from sqlalchemy import create_engine
  from sqlalchemy.orm import sessionmaker, scoped_session
  from aim.storage.migrations.utils import upgrade_database
  from aim.storage.structured.sql_engine.factory import ModelMappedFactory
  from aim.storage.types import SafeNone
  from aim.web.configs import AIM_LOG_LEVEL_KEY
label_desc: Use image node_id 4 for calling the DB obj's underlying member method code with example usage: obj.get_db_url(path) and returns: db_url