@register.simple_tag(name="hook", takes_context=True)
def hook_tag(context, name, *args, **kwargs):
    return format_html_join(
        sep="\n",
        format_string="{}",
        args_generator=(
            (response, )
            for response in hook(name, context, *args, **kwargs)
        )
    )
Hook tag to call within templates
dataset/ETHPy150Open nitely/django-hooks/hooks/templatetags/hooks_tags.py/hook_tag