code: def test_nested_transform_in_tf_function_with(
      self,
      transform_fn=None,
      mlir_pipeline=None,
      nested_fn=False,
      nested_mlir=False,
  ):
      @def_function.function
      def g(x, y, z):
          @def_function.function
          def f(x, y, z):
              @def_function.function
              def inner_add():
                  return math_ops.add(y, z, name="x_plus_y")
  
              return math_ops.add(x, inner_add(), name="x_plus_y")
  
          nested_fn_transforms = {}
          nested_mlir_transforms = {}
  
          cf = f.get_concrete_function(*inputs)
          gdef = cf.graph.as_graph_def()
          for fdef in gdef.library.function:
              fdef_name = fdef.signature.name
              if nested_fn:
                  nested_fn_transforms[fdef_name] = add_to_multiply
              if nested_mlir:
                  nested_mlir_transforms[fdef_name] = "test-pass"
  
          updated_f = transform.transform_function(
              f,
              inputs=inputs,
              transform_fn=transform_fn,
              mlir_pipeline=mlir_pipeline,
              nested_fn_transforms=nested_fn_transforms,
              nested_mlir_transforms=nested_mlir_transforms,
          )
  
          return updated_f(x, y, z)
  
      inputs = [1.0, 2.0, 4.0]
      graph_def = g.get_concrete_function(*inputs).graph.as_graph_def()
      # Confirm all "AddV2" nodes in the library functions of graph_def are
      # transformed to "Mul".
      ops = collections.Counter()
      for fdef in graph_def.library.function:
          for node in fdef.node_def:
              ops[node.op] += 1
  
      self.assertNotIn("AddV2", ops)
      self.assertEqual(ops["Mul"], 2)
  
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 9 for calling the TransformTest obj's underlying member method code with example usage: obj.test_nested_transform_in_tf_function_with(transform_fn, mlir_pipeline, nested_fn, nested_mlir) and returns: updated_f, math_ops, math_ops