code: def is_tensor_final(self, tensor_name):
      
      tensor = self._name_to_tensor(tensor_name)
      return tensor in self._final_tensors
docs: 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.