code: def on_init_end(self, trainer: "pl.Trainer") -> None:
      current_frame = inspect.currentframe()
      # Trainer.init() -> Trainer._call_callback_hooks() -> Callback.on_init_end()
      frame = current_frame.f_back.f_back
      init_args = {}
      for local_args in collect_init_args(frame, []):
          init_args.update(local_args)
  
      self.work.trainer_hparams = self._sanitize_trainer_init_args(
          init_args
      )
  
imports: import inspect
  from typing import TYPE_CHECKING, Any, Dict, Union
  import lightning.pytorch
  from lightning.app.storage.path import Path
  from lightning.app.utilities.app_helpers import Logger
  from lightning.pytorch import Callback
  from lightning.pytorch.callbacks.progress.progress_bar import get_standard_metrics
  from lightning.pytorch.loggers import TensorBoardLogger, WandbLogger
  from lightning.pytorch.utilities.parsing import collect_init_args
  from core.state import ProgressBarState, TrainerState
label_desc: Use image node_id 2 for calling the PLAppSummary obj's underlying member method code with example usage: obj.on_init_end(trainer) without return types