def METHOD_NAME(config, kernel_irqs: List, kernel_macros: Dict,
                         kernel_regions: List, physBase: int, physical_memory,
                         outputStream):
    jinja_env = jinja2.Environment(loader=jinja2.BaseLoader, trim_blocks=True,
                                   lstrip_blocks=True)
    template = jinja_env.from_string(HEADER_TEMPLATE)
    template_args = dict(
        builtins.__dict__,
        **{
            'config': config,
            'kernel_irqs': kernel_irqs,
            'kernel_macros': kernel_macros,
            'kernel_regions': kernel_regions,
            'physBase': physBase,
            'physical_memory': physical_memory})
    data = template.render(template_args)
    with outputStream:
        outputStream.write(data)