def METHOD_NAME(
    func_ir,
    work_list,
    block,
    i,
    expr,
    py_func,
    typemap,
    calltypes,
    typingctx,
    targetctx,
):
    # try and get a definition for the call, this isn't always possible as
    # it might be a eval(str)/part generated awaiting update etc. (parfors)
    to_inline = None
    try:
        to_inline = func_ir.get_definition(expr.func)
    except Exception:
        return False
    # do not handle closure inlining here, another pass deals with that.
    if getattr(to_inline, "op", False) == "make_function":
        return False
    # check this is a known and typed function
    try:
        func_ty = typemap[expr.func.name]
    except KeyError:
        return False
    if not hasattr(func_ty, "get_call_type"):
        return False
    sig = calltypes[expr]
    templates = getattr(func_ty, "templates", None)
    arg_typs = sig.args
    if templates is None:
        return False
    assert len(templates) == 1
    # at this point we know we maybe want to inline something and there's
    # definitely something that could be inlined.
    return _run_inliner(
        func_ir,
        sig,
        templates[0],
        arg_typs,
        expr,
        i,
        py_func,
        block,
        work_list,
        typemap,
        calltypes,
        typingctx,
        targetctx,
    )