code: def testOverridingWithWrongNumberOfTensorOutputsErrors(self):
      def wrong_outputs_callback(
          op_type, inputs, attrs, outputs, op_name=None, graph=None
      ):
          del op_type, inputs, attrs, op_name, graph  # Unused.
          return outputs[0], math_ops.negative(outputs[0])
  
      @def_function.function
      def log1p(x):
          return math_ops.log(1.0 + x)
  
      x = constant_op.constant(3.0)
      op_callbacks.add_op_callback(wrong_outputs_callback)
      with self.assertRaisesRegex(
          ValueError, r"returned 2 tensors, .* does not match .* \(1\)"
      ):
          log1p(x)
  
imports: import threading
  import numpy
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import test
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import op_callbacks
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import script_ops
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.util import compat
label_desc: Use image node_id 5 for calling the OpCallbacksErrorConditionsTest obj's underlying member method code with example usage: obj.testOverridingWithWrongNumberOfTensorOutputsErrors() and returns: outputs,  math_ops, math_ops