code: def test_nested_python_function_transform_with(
      self, transform_fn=None, mlir_pipeline=None
  ):
      @def_function.function
      def f(x, y):
          def inner_add():
              return math_ops.add(x, y, name="x_plus_y")
  
          return inner_add()
  
      inputs = [1.0, 2.0]
      self.assertEqual(f(*inputs), 3.0)  # 1 + 2 = 3
  
      # Transform `f`.
      updated_f = transform.transform_function(
          f,
          inputs=inputs,
          transform_fn=transform_fn,
          mlir_pipeline=mlir_pipeline,
      )
      # Nested Python functions should be transformed.
      self.assertEqual(updated_f(*inputs), 2.0)
  
imports: import collections
  from absl.testing import parameterized
  from tensorflow.core.function.testing import test_pass
  from tensorflow.core.function.transform import transform
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import test_util
  from tensorflow.python.module import module
  from tensorflow.python.ops import custom_gradient
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import while_loop
  from tensorflow.python.platform import test
  from tensorflow.python.saved_model import load
  from tensorflow.python.saved_model import save
label_desc: Use image node_id 7 for calling the TransformTest obj's underlying member method code with example usage: obj.test_nested_python_function_transform_with(transform_fn, mlir_pipeline) and returns: inner_add, math_ops