code: def test_lr_monitor_custom_pg_name(tmpdir):
      class TestModel(BoringModel):
          def configure_optimizers(self):
              optimizer = torch.optim.SGD(
                  [
                      {
                          "params": list(self.layer.parameters()),
                          "name": "linear",
                      }
                  ],
                  lr=0.1,
              )
              lr_scheduler = torch.optim.lr_scheduler.StepLR(
                  optimizer, step_size=1
              )
              return [optimizer], [lr_scheduler]
  
      lr_monitor = LearningRateMonitor()
      trainer = Trainer(
          default_root_dir=tmpdir,
          max_epochs=2,
          limit_val_batches=2,
          limit_train_batches=2,
          callbacks=[lr_monitor],
          logger=CSVLogger(tmpdir),
          enable_progress_bar=False,
          enable_model_summary=False,
      )
      trainer.fit(TestModel())
      assert list(lr_monitor.lrs) == ["lr-SGD/linear"]
  
imports: import pytest
  import torch
  from lightning.pytorch import Trainer
  from lightning.pytorch.callbacks import EarlyStopping, LearningRateMonitor
  from lightning.pytorch.callbacks.callback import Callback
  from lightning.pytorch.callbacks.finetuning import BackboneFinetuning
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.loggers import CSVLogger
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from torch import optim
  from tests_pytorch.helpers.datamodules import ClassifDataModule
  from tests_pytorch.helpers.runif import RunIf
  from tests_pytorch.helpers.simple_models import ClassificationModel
label_desc: Use image node_id 12 for calling a global function with example usage: test_lr_monitor_custom_pg_name(tmpdir) and returns: list,  list