class_docstr: The ScriptRunner executes the script using ``runpy`` and also patches the Trainer methods to inject additional
  code.
code: def configure_tracer(self) -> Tracer:
      from lightning.pytorch import Trainer
  
      from core.callbacks import (
          PLAppArtifactsTracker,
          PLAppProgressTracker,
          PLAppSummary,
          PLAppTrainerStateTracker,
      )
  
      tracer = Tracer()
      trainer_artifacts_tracker = PLAppArtifactsTracker(work=self)
      trainer_state_tracker = PLAppTrainerStateTracker(work=self)
      progress_tracker = PLAppProgressTracker(work=self)
      summary = PLAppSummary(work=self)
  
      def pre_trainer_init(
          _, *args: Any, **kwargs: Any
      ) -> Tuple[Dict, Tuple[Any, ...], Dict[str, Any]]:
          kwargs.setdefault("callbacks", [])
          kwargs["callbacks"].extend(
              [
                  trainer_artifacts_tracker,
                  trainer_state_tracker,
                  progress_tracker,
                  summary,
              ]
          )
          return {}, args, kwargs
  
      tracer.add_traced(Trainer, "__init__", pre_fn=pre_trainer_init)
      return tracer
  
file_path: pytorch-lightning/src/lightning/app/cli/pl-app-template/core/components/script_runner/script_runner.py
imports: import sys
  import traceback
  from typing import Any, Dict, List, Optional, Tuple
  from lightning.app.components.python import TracerPythonScript
  from lightning.app.storage.path import Path
  from lightning.app.utilities.packaging.build_config import BuildConfig, load_requirements
  from lightning.app.utilities.tracer import Tracer
label_desc: Use image node_id 2 for calling the ScriptRunner obj's underlying member method code with example usage: obj.configure_tracer() and returns: tracer, dict,  args,  kwargs