code: def test_summary_callback_tracks_hyperparameters():
      class ModelWithParameters(LightningModule):
          def __init__(
              self,
              float_arg=0.1,
              int_arg=5,
              bool_arg=True,
              string_arg="string",
          ):
              super().__init__()
              self.save_hyperparameters()
  
      model = ModelWithParameters()
      work = Mock()
      summary = PLAppSummary(work)
      trainer = Trainer(
          max_epochs=22, callbacks=[summary]
      )  # this triggers the `Callback.on_init_end` hook
      summary.setup(trainer, model)
      assert work.model_hparams == {
          "float_arg": "0.1",
          "int_arg": "5",
          "bool_arg": "True",
          "string_arg": "string",
      }
  
      assert work.trainer_hparams["max_epochs"] == "22"
      assert work.trainer_hparams["logger"] == "True"
      assert "ModelCheckpoint" in work.trainer_hparams["callbacks"]
      assert "PLAppSummary" in work.trainer_hparams["callbacks"]
  
file_path: pytorch-lightning/src/lightning/app/cli/pl-app-template/tests/core/test_callbacks.py
imports: import os.path
  from unittest.mock import Mock
  import pytest
  from core.callbacks import PLAppArtifactsTracker, PLAppProgressTracker, PLAppSummary
  from core.components.script_runner import ScriptRunner
  from lightning.app.storage.path import Path
  from lightning.pytorch import LightningModule, Trainer
  from lightning.pytorch.loggers import TensorBoardLogger
label_desc: Use image node_id 2 for calling a global function with example usage: test_summary_callback_tracks_hyperparameters() without return types