code: def test_transform_with_nested_function(self):
      @def_function.function
      def f(x, z):
          @def_function.function
          def add():
              i = constant_op.constant(1.0)
              c = lambda i: math_ops.less(i, 3.0)
              b = lambda i: (math_ops.add(i, z, name="x_plus_y"))
              i = while_loop.while_loop_v2(c, b, [i])
              return i
  
          y = add()
          return math_ops.add(x, y, name="x_plus_y")
  
      one = constant_op.constant(1.0)
      two = constant_op.constant(2.0)
      inputs = [one, two]
  
      # By default only `f` is transformed.
      updated_f = transform.transform_function(
          f, inputs=inputs, transform_fn=add_to_multiply
      )
      self.assertEqual(updated_f(*inputs), 3.0)  # 1 x (1 + 2) = 3
  
      # Extract all the functions in `f`'s library that we want to transform.
      nested_transforms = {}
      gdef = f.get_concrete_function(*inputs).graph.as_graph_def()
      for fdef in gdef.library.function:
          nested_transforms[fdef.signature.name] = add_to_multiply
  
      # Transform `f` and all of its library functions.
      updated_f = transform.transform_function(
          f,
          inputs=inputs,
          transform_fn=add_to_multiply,
          nested_fn_transforms=nested_transforms,
      )
      self.assertEqual(updated_f(*inputs), 4.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 6 for calling the TransformTest obj's underlying member method code with example usage: obj.test_transform_with_nested_function() and returns: math_ops, i