code: def _grad_fn(ys, xs, args, func_graph):
      """Computes the gradient of `func_graph` in the current graph.
  
      This function builds the gradient graph of the corresponding forward-pass
      `func_graph` by differentiating `func_graph`'s outputs w.r.t. its inputs.
  
      Args:
        ys: A `Tensor` or list of tensors to be differentiated.
        xs: A `Tensor` or list of tensors to be used for differentiation.
        args: The input arguments.
          args[0] - Loop counter
          args[1] - Total number of iterations.
          args[2] - maximum_iterations.
          args[3:] - Incoming gradients for `ys`.
        func_graph: function.FuncGraph. The corresponding forward-pass function.
  
      Returns:
        The output gradient Tensors.
      """
      grad_ys = args[3:]
  
      # Build the gradient graph. Note that this builds the gradient computation of
      # func_graph in the current graph, which requires capturing tensors from
      # func_graph. The captured func_graph tensors are resolved to external tensors
      # after the forward While op has been rewritten in _resolve_grad_captures.
      # TODO(srbs): Mark GradientsHelper as public?
      grad_outs = gradients_util._GradientsHelper(
          ys,
          xs,
          grad_ys=grad_ys,
          src_graph=func_graph,
          unconnected_gradients="zero",
      )
  
      # TODO(b/118712257): Handle the case when grad_outs has None's e.g. when there
      # is a tf.StopGradient in the loop body.
      assert all(g is not None for g in grad_outs)
      counter = args[0]
      maximum_iterations = args[1]
      total_iters = args[2]
      return [counter + 1, maximum_iterations, total_iters] + grad_outs
  
imports: import collections
  from tensorflow.core.framework import attr_value_pb2
  from tensorflow.python.client import pywrap_tf_session
  from tensorflow.python.eager import backprop_util
  from tensorflow.python.framework import auto_control_deps_utils
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import func_graph
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import control_flow_util
  from tensorflow.python.ops import control_flow_util_v2
  from tensorflow.python.ops import default_gradient
  from tensorflow.python.ops import gen_functional_ops
  from tensorflow.python.ops import gen_resource_variable_ops
  from tensorflow.python.ops import gradients_util
  from tensorflow.python.ops import handle_data_util
  from tensorflow.python.ops import list_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import tensor_array_ops
  from tensorflow.python.ops import while_v2_indexed_slices_rewriter
  from tensorflow.python.util import compat
  from tensorflow.python.util import nest
  from tensorflow.python.util import object_identity
  from tensorflow.python.util import variable_utils
label_desc: Use image node_id 10 for calling a global function with example usage: _grad_fn(ys, xs, args, func_graph) and returns: unknown