    def decorator(function):
        """Decorator registering a function handling ``tag`` elements."""
        HTML_HANDLERS[tag] = function
        return function
Decorator registering a function handling ``tag`` elements.
weasyprint/html.py