def METHOD_NAME(
    nopython=nopython,
    cache=cache,
    parallel=parallel,
    fastmath=fastmath,
    error_model=error_model,
):
    """Wrapper around numba.generated_jit.
    Allows you to redirect a function to another based on its type
    - see the Numba docs for more info
    """
    if numba_enabled:
        def wrapper(func):
            # TODO change to overload, but currently breaks tests with nopython
            return numba.generated_jit(
                func,
                nopython=nopython,
                cache=cache,
                parallel=parallel,
                fastmath=fastmath,
                error_model=error_model,
            )
            # return extending.overload(func, jit_options={'nopython': nopython, 'cache': cache,
            #                                             'parallel': parallel,
            #                                             'fastmath': fastmath, 'error_model': error_model})
    else:
        def wrapper(func):
            return func
    return wrapper