@staticmethod
def split_dimensions(dim):
    """Given a string like "dimension(a,b,c)" return the list of dimensions ['a','b','c']."""
    dim = dim[10:-1]
    br = 0
    d = 1
    ds = ['']
    for c in dim:
        if c != ',':
            ds[-1] += c
        if c == '(':
            br += 1
        elif c == ')':
            br -= 1
        elif c == ',':
            if br == 0:
                ds.append('')
            else:
                ds[-1] += ','
    return ds
