def code_to_func(lang, code, out_parms, func_name, func_parms, symb_replace):

    if not isinstance(code[1], list):
        code = (code[0], [code[1]])
    if not isinstance(out_parms, list):
        out_parms = [out_parms]

    lang = lang.lower()
    if lang in ['python', 'py']:
        gen_func = gen_py_func
    elif lang in ['c', 'c++']:
        gen_func = gen_c_func
    elif ['julia', 'jl'] in lang:
        gen_func = gen_julia_func
    else:
        raise Exception('chosen language not supported.')

    if symb_replace:
        sympified_replace = {}
        for k, v in symb_replace.items():
            if isinstance(k, str):
                k = sympy.Symbol(k)
            if isinstance(v, str):
                v = sympy.Symbol(v)
            sympified_replace[k] = v
        code = xreplace(code, sympified_replace)

    return gen_func(code, out_parms, func_parms, func_name)
dataset/ETHPy150Open cdsousa/SymPyBotics/sympybotics/symcode/generation.py/code_to_func/swapped operands of `in`