Whether this MTF dimension may be assigned to this mesh dimension.

    Args:
      mtf_dimension_name: string, the name of a Mesh TensorFlow dimension.
      mesh_dimension_name: string, the name of a mesh dimension.

    Returns:
      A boolean indicating whether the assignment is valid.

def is_valid_assignment(self, mtf_dimension_name, mesh_dimension_name):
    """Whether this MTF dimension may be assigned to this mesh dimension.

    Args:
      mtf_dimension_name: string, the name of a Mesh TensorFlow dimension.
      mesh_dimension_name: string, the name of a mesh dimension.

    Returns:
      A boolean indicating whether the assignment is valid.
    """
    return ((mtf_dimension_name in self._splittable_mtf_dimension_names) and
            (self._mtf_dimension_name_to_size_gcd[mtf_dimension_name] %
             self._mesh_dimension_name_to_size[mesh_dimension_name] == 0))