def _local_var_name(splittable_dimensions, assignment):
    """Name for a local variable.

  Args:
    splittable_dimensions: frozenset of names of splittable dimensions.
    assignment: dict from names of splittable dimensions to names of mesh
      dimensions.

  Returns:
    A string, the variable name.
  """
    assignment_string = []
    for splittable in sorted(splittable_dimensions):
        if splittable in assignment:
            assignment_string.append('{}:{}'.format(splittable, assignment[
                splittable]))
        else:
            assignment_string.append('{}'.format(splittable))
    return 'y_(' + ','.join(assignment_string) + ')'
