<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def inject(self, function=None, **names):
 """ Inject dependencies into `funtion`'s arguments when called. The `Injector` will look for registered dependencies matching named arguments and automatically pass them to the given function when it's called. :param function: The function to inject into :type function: callable :param \**names: in the form of ``argument='name'`` to override the default behavior which matches dependency names with argument names. """

        def decorator(function):
            @wraps(function)
            def wrapper(*args, **kwargs):
                sig = signature(function)
                params = sig.parameters

                bound = sig.bind_partial(*args, **kwargs)
                bound.apply_defaults()

                injected_kwargs = {}
                for key, value in params.items():
                    if key not in bound.arguments:
                        name = names.get(key)
                        if name:
                            # Raise error when dep named explicitly
                            # and missing
                            injected_kwargs[key] = self.get(name)
                        else:
                            try:
                                injected_kwargs[key] = self.get(key)
                            except DependencyNotFoundError as e:
                                warnings.warn(
                                    ambigious_not_found_msg.format(key),
                                    DependencyNotFoundWarning
                                )
                            
                injected_kwargs.update(bound.kwargs)
                return function(*bound.args, **injected_kwargs)
            return wrapper
        if function:
            return decorator(function)
        return decorator