def _composedecorator(*decs):
    """Returns a composition of several decorators.
    Source: https://stackoverflow.com/a/5409569
    Usage::
            @composedec(decorator1, decorator2)
            def func_that_needs_decoration(args):
                pass
        is equavalent to::
            @decorator1
            @decorator2
            def func_that_needs_decoration(args):
                pass
    """

    def deco(f):
        for dec in reversed(decs):
            f = dec(f)
        return f

    return deco