code: def _prepare_args(args, kwargs):
      """Returns structures like inputs with values as Tensors."""
      i = -1
  
      def c2t(x):
          nonlocal i
          # Don't use convert_nonref_to_tensor here. We want to have semantics like
          # tf.GradientTape which watches only trainable_variables. (Note: we also
          # don't want to cal c2t on non-trainable variables since these are already
          # watchable by GradientTape.)
          if tensor_util.is_module(x) or tensor_util.is_variable(x):
              return x
          i += 1
          return tf.convert_to_tensor(
              x, dtype_hint=tf.float32, name="x{}".format(i)
          )
  
      return tf.nest.map_structure(c2t, (args, kwargs))
  
file_path: probability/tensorflow_probability/python/math/gradient.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 9 for calling a global function with example usage: _prepare_args(args, kwargs) and returns: tf, tf, x