code: def testOverrideDTypeInFuncGraph(self):
      def to_float64(
          op_type, inputs, attrs, outputs, op_name=None, graph=None
      ):
          del inputs, attrs, op_name, graph  # Unused.
          if op_type in ("Const", "Placeholder"):
              return outputs
          else:
              return [
                  math_ops.cast(output, dtypes.float64)
                  for output in outputs
              ]
  
      op_callbacks.add_op_callback(to_float64)
  
      @def_function.function
      def add_1_times_2(x):
          return (x + 1.0) * 2.0
  
      x = constant_op.constant(3.0, dtype=dtypes.float32)
      y = add_1_times_2(x)
      self.assertEqual(y.dtype, dtypes.float64)
      self.assertAllClose(y, 8.0)
  
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 20 for calling the OpCallbacksTest obj's underlying member method code with example usage: obj.testOverrideDTypeInFuncGraph() and returns: unknown, outputs, unknown