def _clean_order(order):
    '\n    Takes something like (1 1 0)(0 1 1) and returns a arma order, sarma\n    order tuple. Also accepts (1 1 0) and return arma order and (0, 0, 0)\n    '
    order = re.findall('\\([0-9 ]*?\\)', order)

    def clean(x):
        return tuple(map(int, re.sub('[()]', '', x).split(' ')))
    if (len(order) > 1):
        (order, sorder) = map(clean, order)
    else:
        order = clean(order[0])
        sorder = (0, 0, 0)
    return (order, sorder)
Takes something like (1 1 0)(0 1 1) and returns a arma order, sarma
order tuple. Also accepts (1 1 0) and return arma order and (0, 0, 0)
def _clean_order(order):
    '\n    Takes something like (1 1 0)(0 1 1) and returns a arma order, sarma\n    order tuple. Also accepts (1 1 0) and return arma order and (0, 0, 0)\n    '
    order = re.findall('\\([0-9 ]*?\\)', order)

    def clean(x):
        return tuple(map(int, re.sub('[()]', , x).split(' ')))
    if (len(order) > 1):
        (order, sorder) = map(clean, order)
    else:
        order = clean(order[0])
        sorder = (0, 0, 0)
    return (order, sorder)