def compile_function(name, code, globs):
    co = compile(code.rstrip(), "<string>", "single")
    ns = {}
    eval(co, globs, ns)
    return ns[name]
Given a *code* string, compile it with globals *globs* and return
dataset/ETHPy150Open numba/numba/numba/tests/support.py/compile_function