def beforeafter(before, after):

    def decor(func):

        def wrapper(html):
            preprocessed_html = before(html)
            result = func(preprocessed_html)
            postprocessed_result = after(result)
            return postprocessed_result
        return wrapper
    return decor

45fa78c8b4d1d6d3e7a2d935f760430b9777f916
<mask token>

def beforeafter(before, after):

    def decor(func):

        def wrapper(html):
            preprocessed_html = before(html)
            result = func(preprocessed_html)
            postprocessed_result = after(result)
            return postprocessed_result
        return wrapper
    return decor
