def METHOD_NAME(kernel_header, api, debug):
    template = Environment(loader=BaseLoader, trim_blocks=False,
                           lstrip_blocks=False).from_string(KERNEL_HEADER_TEMPLATE)
    data = template.render({'assembler': map_syscalls_neg(api),
                            'enum': map_syscalls_neg(api + debug),
                            'upper': convert_to_assembler_format,
                            'syscall_min': -sum([len(lst) for (cond, lst) in api])})
    kernel_header.write(data)