code: def test_non_eager_failure(self):
      with tf.compat.v1.Graph().as_default():
          assert not tf.executing_eagerly()
          self._initialize_model(writer=self.logdir)
          with self.assertRaisesRegex(
              RuntimeError, "only supported in TensorFlow eager mode"
          ):
              self.model.fit(
                  x=[(1,)], y=[(2,)], callbacks=[self.callback]
              )
  
file_path: tensorboard/tensorboard/plugins/hparams/_keras_test.py
imports: import os
  from unittest import mock
  from google.protobuf import text_format
  import tensorflow
  from tensorboard.plugins.hparams import _keras
  from tensorboard.plugins.hparams import metadata
  from tensorboard.plugins.hparams import plugin_data_pb2
  from tensorboard.plugins.hparams import summary_v2
label_desc: Use image node_id 5 for calling the CallbackTest obj's underlying member method code with example usage: obj.test_non_eager_failure() without return types