def test_serializedAttributeWithTransparentTagWithRenderer(self):
        """
        Like L{test_serializedAttributeWithTransparentTag}, but when the
        attribute is rendered by a renderer on an element.
        """
        class WithRenderer(Element):
            def __init__(self, value, loader):
                self.value = value
                super(WithRenderer, self).__init__(loader)
            @renderer
            def stuff(self, request, tag):
                return self.value
        toss = []
        self.checkAttributeSanitization(
            lambda value: toss.append(value) or
                          tags.transparent(render="stuff"),
            lambda tag: WithRenderer(toss.pop(), TagLoader(tag))
        )

        Like L{test_serializedAttributeWithTransparentTag}, but when the
        attribute is rendered by a renderer on an element.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_flatten.py