def parametrized_function(decorator):
    '''Decorator used to create decorators with arguments.
    Should be used with function returning another function
    that will be called with the original function has the first
    parameter.
    No difference are made between method and function,
    so the wrapper function will have to know if the first
    argument is an instance (self).

    Note that when using reflect or annotate module functions,
    depth should be incremented by one.

    Example::

        @decorator.parametrized_function
        def mydecorator(function_original, decorator, arguments):

            def wrapper(call, arguments):
                # processing
                return function_original(call, arguments)

            return wrapper

        @mydecorator(decorator, arguments)
        def myfunction():
            pass

    '''

    def meta_decorator(*args, **kwargs):
        return _NormalMetaDecorator(decorator, args, kwargs)

    return meta_decorator