def insert_sortvars(s,env):
    """
    Convert each named TopSort to a new SortVar
    """
    if type(s) is TopSort and s.is_sort_variable():
        if env not in s:
            env[s] = SortVar()
        return env[s]
    elif type(s) is FunctionSort:
        return FunctionSort(*(
            insert_sortvars(x,env) for x in s
        ))
    else:
        return s
dataset/ETHPy150Open Microsoft/ivy/ivy/type_inference.py/insert_sortvars/swapped operands of `not in`