def parameterized(dec):
    """
    Meta decorator.
    Decorate a decorator that accepts the decorated function as first argument,
    and then other arguments with this decorator, to be able to pass it
    arguments.

    Source: http://stackoverflow.com/a/26151604

    >>> @parameterized
    ... def multiply(f, n):
    ...     def dec(*args, **kwargs):
    ...         return f(*args, **kwargs) * n
    ...     return dec
    >>> @multiply(5)
    ... def add(a, b):
    ...     return a + b
    >>> add(3, 2)
    25
    """

    def layer(*args, **kwargs):
        def repl(f):
            return dec(f, *args, **kwargs)

        return repl

    return layer