code: def test_make_app_template():
      template_name = "app-test-template"
      template_name_folder = re.sub("-", "_", template_name)
  
      # remove the template if there
      template_dir = os.path.join(os.getcwd(), template_name)
      with contextlib.suppress(Exception):
          shutil.rmtree(template_dir)
  
      # create template
      subprocess.check_output(
          f"lightning init app {template_name}", shell=True
      )
  
      # make sure app is not in the env
      env_output = subprocess.check_output("pip freeze", shell=True)
      assert template_name not in str(env_output)
  
      # install the app
      env_output = subprocess.check_output(
          f"cd {template_name} && pip install -r requirements.txt && pip install -e .",
          shell=True,
      )
      env_output = subprocess.check_output("pip freeze", shell=True)
      assert template_name in str(env_output)
  
      app_dir = os.path.join(
          template_dir, f"{template_name_folder}/app.py"
      )
      output = subprocess.check_output(
          f"lightning run app {app_dir} --fast_dev_run"
      )  # noqa
      # TODO: verify output
  
      # clean up the template dir
      with contextlib.suppress(Exception):
          shutil.rmtree(template_dir)
  
file_path: pytorch-lightning/tests/tests_app/cli/test_cmd_init.py
imports: import contextlib
  import os
  import re
  import shutil
  import subprocess
  import pytest
  from lightning.app.cli import cmd_init
  from lightning.app.utilities.imports import _IS_MACOS, _IS_WINDOWS
label_desc: Use image node_id 2 for calling a global function with example usage: test_make_app_template() without return types