def sexp_to_key_map(sexp):
    try:
        key_type = type(key(":key"))
        result = {}
        for i in range(0, len(sexp), 2):
            k, val = sexp[i], sexp[i + 1]
            if type(k) == key_type:
                result[str(k)] = val
        return result
    except:
        raise Exception(sexp % "not a sexp: %s")
dataset/ETHPy150Open ensime/ensime-sublime/sexp.py/sexp_to_key_map/swapped operands of `%`