def parse(ts):
    d = []
    while len(ts) > 1 and ']' not in ts[0]:
        key = check_key(ts[0])
        ts, val = parse_value(ts[1], ts[2:])
        d.append((key, val))

    return ts[1:], tuple(d)
dataset/ETHPy150Open spotify/python-graphwalker/graphwalker/gml.py/parse/swapped operands of `not in`