#NEWLINE# def template_hook_collect( module , hook_name , * args , **kwargs ) : #NEWLINE# #INDENT# '\n    Helper to include in your own templatetag, for static TemplateHooks\n\n    Example::\n\n        import myhooks\n        from hooks.templatetags import template_hook_collect\n\n        @register.simple_tag(takes_context=True)\n        def hook(context, name, *args, **kwargs):\n            return template_hook_collect(myhooks, name, context, *args, **kwargs)\n\n    :param module module: Module containing the template hook definitions\n    :param str hook_name: The hook name to be dispatched\n    :param \\*args: Positional arguments, will be passed to hook callbacks\n    :param \\*\\*kwargs: Keyword arguments, will be passed to hook callbacks\n    :return: A concatenation of all callbacks    responses marked as safe (conditionally)\n    :rtype: str\n    ' #NEWLINE# try : #NEWLINE# #INDENT# templatehook = getattr ( module , module ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# return format_html_join ( sep = '\n' , format_string = '{}' , args_generator = ( ( response , ) for response in templatehook ( * args , ** kwargs ) ) )