def _lower_get_address(context, builder, func, sig, failure_mode,
                       *, function_name):
    """Low-level call to <function_name>(func, sig).

    When calling this function, GIL must be acquired.
    """
    pyapi = context.get_python_api(builder)

    # Get the cfunc wrapper address. The code below trusts that the
    # function numba.function._get_wrapper_address exists and can be
    # called with two arguments. However, if an exception is raised in
    # the function, then it will be caught and propagated to the
    # caller.

    modname = context.insert_const_string(builder.module, __name__)
    numba_mod = pyapi.import_module(modname)
    numba_func = pyapi.object_getattr_string(numba_mod, function_name)
    pyapi.decref(numba_mod)
    sig_obj = pyapi.unserialize(pyapi.serialize_object(sig))

    addr = pyapi.call_function_objargs(numba_func, (func, sig_obj))

    if failure_mode != 'ignore':
        with builder.if_then(cgutils.is_null(builder, addr), likely=False):
            # *function_name* has raised an exception, propagate it
            # to the caller.
            if failure_mode == 'return_exc':
                context.call_conv.return_exc(builder)
            elif failure_mode == 'return_null':
                builder.ret(pyapi.get_null_object())
            else:
                raise NotImplementedError(failure_mode)
    # else the caller will handle addr == NULL
    return addr  # new reference or NULL
Low-level call to <function_name>(func, sig).

    When calling this function, GIL must be acquired.
    
numba/experimental/function_type.py