code: def _execute_app_commands(cl: CommandLines) -> None:
      """Open a subprocess shell to execute app commands.
  
      The calling app environment is used in the current environment the code is running in
  
      """
      for command, line_number in zip(cl.commands, cl.line_numbers):
          logger.info(f"Running app setup command: {command}")
          completed = subprocess.run(
              command,
              shell=True,
              env=os.environ,
          )
          try:
              completed.check_returncode()
          except subprocess.CalledProcessError:
              err_txt = (
                  f"There was a problem on line {line_number} of {cl.file} while executing the command: "
                  f"{command}. More information on the problem is shown in the output above this "
                  f"message. After editing this line to fix the problem you can run the app again."
              )
              logger.error(err_txt)
              raise MisconfigurationException(err_txt) from None
  
file_path: pytorch-lightning/src/lightning/app/utilities/app_commands.py
imports: import logging
  import os
  import subprocess
  from dataclasses import dataclass, field
  from typing import List
  from lightning.app.utilities.exceptions import MisconfigurationException
label_desc: Use image node_id 2 for calling a global function with example usage: _execute_app_commands(cl) without return types