code: def test_db(client):
      # Fetch all so we don't have to go through the pain of setting context attributes
      # to fetch a single database.
      all_databases_response = client.get(
          "/api/databases", follow_redirects=True
      )
      all_dbs = all_databases_response.get_json()
      for database in all_dbs:
          if database["name"] == "example_db":
              return database
      return None
  
imports: import os
  import pytest
  from tempfile import TemporaryDirectory
  from mindsdb.api.http.initialize import initialize_app
  from mindsdb.migrations import migrate
  from mindsdb.interfaces.storage import db
  from mindsdb.utilities.config import Config
label_desc: Use image node_id 3 for calling a global function with example usage: test_db(client) and returns: None, database