docstr: Test LambdaCallback's behavior with custom defined callback.
docstr_tok: ["Test","LambdaCallback","'s","behavior","with","custom","defined","callback","."]
code: def test_lambda_callback_with_kwargs(self):
      """Test LambdaCallback's behavior with custom defined callback."""
      batch_size = 4
      model = Sequential(
          [
              layers.Input(shape=(2,), batch_size=batch_size),
              layers.Dense(1),
          ]
      )
      model.compile(
          optimizer=optimizers.SGD(), loss=losses.MeanSquaredError()
      )
      x = np.random.randn(16, 2)
      y = np.random.randn(16, 1)
      model.fit(
          x, y, batch_size=batch_size, epochs=1, verbose=0
      )  # Train briefly for evaluation to work.
  
      def custom_on_test_begin(logs):
          logging.warning("custom_on_test_begin_executed")
  
      lambda_log_callback = callbacks.LambdaCallback(
          on_test_begin=custom_on_test_begin
      )
      with self.assertLogs(level="WARNING") as logs:
          model.evaluate(
              x,
              y,
              batch_size=batch_size,
              callbacks=[lambda_log_callback],
              verbose=0,
          )
          self.assertTrue(
              any(
                  "custom_on_test_begin_executed" in log
                  for log in logs.output
              )
          )
  
file_path: keras/keras/callbacks/lambda_callback_test.py
imports: import numpy
  import pytest
  from absl import logging
  from keras import callbacks
  from keras import layers
  from keras import losses
  from keras import optimizers
  from keras import testing
  from keras.models.sequential import Sequential
label_desc: Use image node_id 3 for calling the LambdaCallbackTest obj's underlying member method code with example usage: obj.test_lambda_callback_with_kwargs() without return types