code: def make_app(
      test_params: dict, monkeypatch: Any
  ) -> Generator[Callable, None, None]:
      """
      Provides make_app function to initialize SphinxTestApp instance.
      if you want to initialize 'app' in your test function. please use this
      instead of using SphinxTestApp class directory.
      """
      apps = []
      syspath = sys.path.copy()
  
      def make(*args: Any, **kwargs: Any) -> SphinxTestApp:
          status, warning = StringIO(), StringIO()
          kwargs.setdefault("status", status)
          kwargs.setdefault("warning", warning)
          app_: Any = SphinxTestApp(*args, **kwargs)
          apps.append(app_)
          if test_params["shared_result"]:
              app_ = SphinxTestAppWrapperForSkipBuilding(app_)
          return app_
  
      yield make
  
      sys.path[:] = syspath
      for app_ in reversed(
          apps
      ):  # clean up applications from the new ones
          app_.cleanup()
  
imports: from __future__ import annotations
  import shutil
  import subprocess
  import sys
  from collections import namedtuple
  from io import StringIO
  from typing import TYPE_CHECKING, Any, Callable
  import pytest
  from sphinx.testing.util import SphinxTestApp, SphinxTestAppWrapperForSkipBuilding
label_desc: Use image node_id 8 for calling a global function with example usage: make_app(test_params, monkeypatch) and returns: app_