code: def straight_through(fw_tensor, bw_tensor):
      """Use a tensor in forward pass while backpropagating gradient to another.
  
      Args:
          fw_tensor: A tensor to be used in the forward pass.
          bw_tensor: A tensor to which gradient is backpropagated. Must have the
              same shape and type with :attr:`fw_tensor`.
  
      Returns:
          A tensor of the same shape and value with :attr:`fw_tensor` but will
          direct gradient to bw_tensor.
      """
      return (
          tf.stop_gradient(fw_tensor)
          + bw_tensor
          - tf.stop_gradient(bw_tensor)
      )
  
imports: from typing import List, Union
  import inspect
  import funcsigs
  from pydoc import locate
  import copy
  import collections
  import numpy
  import tensorflow
  from texar.tf.hyperparams import HParams
  from texar.tf.utils.dtypes import is_str, is_callable, compat_as_text, _maybe_list_to_array
label_desc: Use image node_id 29 for calling a global function with example usage: straight_through(fw_tensor, bw_tensor) and returns: unknown