human
I wrote the below code

    def imp(context, builder, sig, args):
        func = context.declare_function(builder.module, fndesc)
        (status, retval) = context.call_conv.call_function(builder, func, fndesc.restype, fndesc.argtypes, args, env=None)
        with cgutils.if_unlikely(builder, status.is_error):
            context.call_conv.return_status_propagate(builder, status)
        assert (sig.return_type == fndesc.restype)
        if isinstance(sig.return_type, types.Optional):
            value_type = sig.return_type.type
            optional_none = context.make_optional_none(builder, value_type)
            retvalptr = cgutils.alloca_once_value(builder, optional_none)
            with builder.if_then(builder.not_(status.is_none)):
                optional_value = context.make_optional_value(builder, value_type, retval)
                builder.store(optional_value, retvalptr)
            retval = builder.load(retvalptr)
        if (retval.type != context.get_value_type(sig.return_type)):
            msg = 'function    returned    {0}    but    expect    {1}'
            raise TypeError(msg.format(retval.type, sig.return_type))
        return impl_ret_new_ref(context, builder, fndesc.restype, retval)
    imp.signature = fndesc.argtypes
    imp.libs = tuple(libs)
    return imp

What's a good function header?

Here's a good function header?
assistant
#Here's a good function header.

def user_function(fndesc, libs):