code: def app():
      old_minds_db_con = ""
      if "MINDSDB_DB_CON" in os.environ:
          old_minds_db_con = os.environ["MINDSDB_DB_CON"]
      with TemporaryDirectory(prefix="skills_test_") as temp_dir:
          db_path = "sqlite:///" + os.path.join(
              temp_dir, "mindsdb.sqlite3.db"
          )
          # Need to change env variable for migrate module, since it calls db.init().
          os.environ["MINDSDB_DB_CON"] = db_path
          db.init()
          migrate.migrate_to_head()
          app = initialize_app(Config(), True, False)
          yield app
  
      os.environ["MINDSDB_DB_CON"] = old_minds_db_con
  
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 1 for calling a global function with example usage: app() without return types