code: def test_throws_when_optimizer_has_schedule(self):
      reduce_lr = callbacks.ReduceLROnPlateau(
          patience=1, factor=0.1, monitor="val_loss", min_delta=100
      )
  
      self.model.compile(
          loss="mse",
          optimizer=optimizers.Adam(
              optimizers.schedules.PolynomialDecay(
                  initial_learning_rate=0.1, decay_steps=10
              )
          ),
      )
  
      with self.assertRaisesRegex(
          TypeError,
          "This optimizer was created with a `LearningRateSchedule`",
      ):
          self.model.fit(
              self.x_train,
              self.y_train,
              validation_data=(self.x_test, self.y_test),
              callbacks=[reduce_lr],
              epochs=2,
          )
  
file_path: keras/keras/callbacks/reduce_lr_on_plateau_test.py
imports: import pytest
  from keras import callbacks
  from keras import layers
  from keras import optimizers
  from keras import testing
  from keras.models import Sequential
  from keras.testing import test_utils
  from keras.utils import io_utils
  from keras.utils import numerical_utils
label_desc: Use image node_id 3 for calling the ReduceLROnPlateauTest obj's underlying member method code with example usage: obj.test_throws_when_optimizer_has_schedule() without return types