def METHOD_NAME(self, nargs):
    llvm_fnty = ir.FunctionType(machine_int, [machine_int] * nargs)
    ctypes_fnty = ctypes.CFUNCTYPE(ctypes.c_size_t,
                                * (ctypes.c_size_t,) * nargs)
    module = self.context.create_module("")
    function = cgutils.get_or_insert_function(module, llvm_fnty, self.id())
    assert function.is_declaration
    entry_block = function.append_basic_block('entry')
    builder = ir.IRBuilder(entry_block)
    first = [True]
    @global_compiler_lock
    def call_func(*args):
        codegen = self.context.codegen()
        library = codegen.create_library("test_module.%s" % self.id())
        library.add_ir_module(module)
        cptr = library.get_pointer_to_function(function.name)
        cfunc = ctypes_fnty(cptr)
        return cfunc(*args)
    yield self.context, builder, function.args, call_func