code: def grad_pass_through(f):
      """Creates a grad-pass-through op with the forward behavior provided in f.
  
      Use this function to wrap any op, maintaining its behavior in the forward
      pass, but replacing the original op in the backward graph with an identity.
      For example:
  
      ```python
      x = tf.Variable(1.0, name="x")
      z = tf.Variable(3.0, name="z")
  
      with tf.GradientTape() as tape:
        # y will evaluate to 9.0
        y = tf.grad_pass_through(x.assign)(z**2)
      # grads will evaluate to 6.0
      grads = tape.gradient(y, z)
      ```
  
      Another example is a 'differentiable' moving average approximation, where
      gradients are allowed to flow into the last value fed to the moving average,
      but the moving average is still used for the forward pass:
  
      ```python
      x = ... # Some scalar value
      # A moving average object, we don't need to know how this is implemented
      moving_average = MovingAverage()
      with backprop.GradientTape() as tape:
        # mavg_x will evaluate to the current running average value
        mavg_x = tf.grad_pass_through(moving_average)(x)
      grads = tape.gradient(mavg_x, x) # grads will evaluate to 1.0
      ```
  
      Args:
        f: function `f(*x)` that returns a `Tensor` or nested structure of `Tensor`
          outputs.
  
      Returns:
        A function `h(x)` which returns the same values as `f(x)` and whose
        gradients are the same as those of an identity function.
      """
  
      @custom_gradient
      def _grad_pass_through_op(*args, **kwargs):
          def grad(*args, **kwargs):
              variables = kwargs.get("variables")
              if variables is not None:
                  # Variables involved in the wrapped op will not receive gradients.
                  return args, [None] * len(variables)
              return args
  
          return f(*args, **kwargs), grad
  
      return tf_decorator.make_decorator(f, _grad_pass_through_op)
  
imports: from tensorflow.python.eager import backprop
  from tensorflow.python.eager import context
  from tensorflow.python.eager import record
  from tensorflow.python.framework import composite_tensor_gradient
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_array_ops
  from tensorflow.python.ops import handle_data_util
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import op_selector
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops.unconnected_gradients import UnconnectedGradients
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import nest
  from tensorflow.python.util import tf_decorator
  from tensorflow.python.util import tf_inspect
  from tensorflow.python.util import variable_utils
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 8 for calling a global function with example usage: grad_pass_through(f) and returns: tf_decorator, f,  grad, args, args,  unknown