code: def test_scheduler_initialized_with_custom_reduceonplateau():
      """Test for initialize custom scheduler with `reduce_on_plateau` argument."""
  
      class CustomReduceLROnPlateau:
          pass
  
      lr_scheduler = {
          "reduce_on_plateau": True,
          "scheduler": CustomReduceLROnPlateau(),
          "monitor": "my_loss",
      }
      config = _configure_schedulers_automatic_opt([lr_scheduler], None)
      assert isinstance(config[0].scheduler, CustomReduceLROnPlateau)
      assert config[0].reduce_on_plateau
  
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 6 for calling a global function with example usage: test_scheduler_initialized_with_custom_reduceonplateau() without return types