Whether a tensor is a final output of the computation.

    Args:
      tensor_name: a string, name of a tensor in the graph.

    Returns:
      a boolean indicating whether the tensor was a final output.

def is_tensor_final(self, tensor_name):
    """Whether a tensor is a final output of the computation.

    Args:
      tensor_name: a string, name of a tensor in the graph.

    Returns:
      a boolean indicating whether the tensor was a final output.
    """
    tensor = self._name_to_tensor(tensor_name)
    return tensor in self._final_tensors