code: def test_reducelronplateau_scheduling(tmpdir):
      class TestModel(BoringModel):
          def training_step(self, batch, batch_idx):
              self.log("foo", batch_idx)
              return super().training_step(batch, batch_idx)
  
          def configure_optimizers(self):
              optimizer = optim.Adam(self.parameters())
              return {
                  "optimizer": optimizer,
                  "lr_scheduler": optim.lr_scheduler.ReduceLROnPlateau(
                      optimizer
                  ),
                  "monitor": "foo",
              }
  
      model = TestModel()
      trainer = Trainer(default_root_dir=tmpdir, fast_dev_run=True)
      trainer.fit(model)
  
      lr_scheduler = trainer.lr_scheduler_configs[0]
      assert lr_scheduler == LRSchedulerConfig(
          scheduler=lr_scheduler.scheduler,
          monitor="foo",
          interval="epoch",
          frequency=1,
          reduce_on_plateau=True,
          strict=True,
          name=None,
      )
  
imports: from unittest import mock
  from unittest.mock import call
  import pytest
  import torch
  from lightning.pytorch import Trainer
  from lightning.pytorch.callbacks import ModelCheckpoint
  from lightning.pytorch.core.optimizer import _configure_optimizers, _configure_schedulers_automatic_opt, _init_optimizers_and_lr_schedulers
  from lightning.pytorch.demos.boring_classes import BoringDataModule, BoringModel
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning.pytorch.utilities.types import LRSchedulerConfig
  from torch import optim
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 7 for calling a global function with example usage: test_reducelronplateau_scheduling(tmpdir) and returns: super, dict