def __call__(self, func):
        self.func = func

        def wrapper(*args, **kwargs):
            # The motivation here is that we want to defer loading the
            # configuration until the function is called for the first
            # time.
            if self.wrapped is None:
                func = self.func
                decorators = get_config().get(
                    self.decorator_config_name, [])
                self.decorators = [
                    resolve_dotted_name(dec) if isinstance(dec, str) else dec
                    for dec in decorators
                    ]
                orig_func = func
                for decorator in self.decorators:
                    func = decorator(func)
                if self.decorators:
                    self.wrapped = wraps(orig_func)(func)
                else:
                    self.wrapped = orig_func
            return self.wrapped(*args, **kwargs)

        return wraps(func)(wrapper)
dataset/ETHPy150Open ottogroup/palladium/palladium/util.py/PluggableDecorator.__call__/original