code: def test_reduce_lr_raise_error_when_key_does_not_exist(
      self, classifier_data, classifier_module
  ):
      X, y = classifier_data
      net = NeuralNetClassifier(
          classifier_module,
          callbacks=[
              (
                  "scheduler",
                  LRScheduler(ReduceLROnPlateau, monitor="bad_key"),
              ),
          ],
          max_epochs=1,
      )
      msg = (
          "'bad_key' was not found in history. A Scoring "
          "callback with name='bad_key' should be placed before the "
          "LRScheduler callback"
      )
      with pytest.raises(ValueError, match=msg):
          net.fit(X, y)
  
imports: from unittest.mock import Mock
  import numpy
  import pytest
  from sklearn.base import clone
  from torch.optim import SGD
  from torch.optim.lr_scheduler import CosineAnnealingLR
  from torch.optim.lr_scheduler import ExponentialLR
  from torch.optim.lr_scheduler import LambdaLR
  from torch.optim.lr_scheduler import MultiStepLR
  from torch.optim.lr_scheduler import ReduceLROnPlateau
  from torch.optim.lr_scheduler import StepLR
  from torch.optim.lr_scheduler import CyclicLR
  from skorch import NeuralNetClassifier
  from skorch.callbacks.lr_scheduler import WarmRestartLR, LRScheduler
label_desc: Use image node_id 5 for calling the TestReduceLROnPlateau obj's underlying member method code with example usage: obj.test_reduce_lr_raise_error_when_key_does_not_exist(classifier_data, classifier_module) without return types