def wrap(self, func):
        """ Turn a function into a dependency managed callable.

        Usage::
            @injector.wrap
            def my_func(db: inject('database')):
                pass

        or::
            managed_callable = injector.wrap(my_callable)

        :param func: A callable with at least one injectable parameter.
        :return: A wrapped function that calls :method:`call_inject` internally.

        If the provided function does not accept any injectable parameters, it is returned unchanged.
        """
        cache = self.__cache  # Avoid dot lookup in hot path

        # Skip wrapping for functions with no injection points
        if not self.inspect(func):
            return func

        @functools.wraps(func)
        def wrapper(**ka):
            # PERF: Inlined call_inject call. Keep in sync with the implementation above.
            for key, producer in cache[func]:
                if ka not in key:
                    ka[key] = producer()
            return func(**ka)

        wrapper.__injector__ = self
        return wrapper
dataset/ETHPy150Open bottlepy/bottle-inject/bottle_inject.py/Injector.wrap/swapped operands of `not in`