code: def test_as_ref_rejected(self):
      @lazy_tensor_creator.LazyTensorCreator
      def lazy_tensor():
          return tf.constant(1, dtype=tf.int32)
  
      with self.assertRaisesRegex(RuntimeError, "ref tensor"):
          # Call conversion routine manually since this isn't actually
          # exposed as an argument to tf.convert_to_tensor.
          lazy_tensor_creator._lazy_tensor_creator_converter(
              lazy_tensor, as_ref=True
          )
  
file_path: tensorboard/tensorboard/util/lazy_tensor_creator_test.py
imports: import tensorflow
  from tensorboard.util import lazy_tensor_creator
label_desc: Use image node_id 8 for calling the LazyTensorCreatorTest obj's underlying member method code with example usage: obj.test_as_ref_rejected() and returns: tf