def wrap_content(cls, container, wrapper):
        "wrap the content of container element with wrapper element"
        wrapper.text = (container.text or '') + (wrapper.text or '')
        container.text = ''
        for ch in container:
            wrapper.append(ch)
        container.insert(0, wrapper)
        return container
def wrap_content ( cls , container , wrapper ) : wrapper . text = ( container . text or '' ) + ( wrapper . text or '' ) container . text = '' for ch in container : wrapper . append ( ch ) container . insert ( 0 , wrapper ) return container
wrap the content of container element with wrapper element