@classmethod
def register_variable_provider(cls, provider):
    """Plugin point to allow functions to manipulate the context
        passed to *all* templates for *all* widgets.

        def provider(context): ...

        TemplateEngine.register_variable_provider(provider)
        """
    cls.variable_providers.append(provider)
