def get_tensor_mtf_dimension_names(self, tensor_name):
    """The Mesh TensorFlow dimensions associated with a tensor.

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

    Returns:
      a [string], the names of Mesh TensorFlow dimensions.
    """
    tensor = self._name_to_tensor(tensor_name)
    if isinstance(tensor, mtf.Tensor):
      return tensor.shape.dimension_names
    else:  # tf.Tensor
      return []