code: def get_db(orion_db):
      """Get database instance"""
      if isinstance(orion_db, EphemeralDB):
          return orion_db._db
      elif isinstance(orion_db, MongoDB):
          return orion_db._db
      elif isinstance(orion_db, PickledDB):
          return orion_db._get_database()._db
      else:
          raise TypeError("Invalid database type")
  
imports: import os
  from datetime import datetime
  import pytest
  from orion.core.io.database import Database
  from orion.core.io.database.ephemeraldb import EphemeralDB
  from orion.core.io.database.mongodb import MongoDB
  from orion.core.io.database.pickleddb import PickledDB
label_desc: Use image node_id 1 for calling a global function with example usage: get_db(orion_db) and returns: orion_db, orion_db, orion_db