def copy_tensors(tensors):
  """Makes deep copies of a dict of tensors.

  Makes deep copies (using tf.identity or its equivalent for `CompositeTensor`s)
  of the values of `tensors`.

  Args:
    tensors: A a dict whose keys are strings and values are `Tensors`s or
      `CompositeTensor`s.

  Returns:
    A copy of `tensors` with values replaced by tf.identity applied to the
        value, or the equivalent for `CompositeTensor`s.
  """
  return {
      name: _copy_tensor_or_composite_tensor(tensor)
      for name, tensor in tensors.items()
  }
Makes deep copies of a dict of tensors.

  Makes deep copies (using tf.identity or its equivalent for `CompositeTensor`s)
  of the values of `tensors`.

  Args:
    tensors: A a dict whose keys are strings and values are `Tensors`s or
      `CompositeTensor`s.

  Returns:
    A copy of `tensors` with values replaced by tf.identity applied to the
        value, or the equivalent for `CompositeTensor`s.
  
tensorflow_transform/tf_utils.py