Decorator `@di`.

def di(self, func):
        """Decorator `@di`.
        """
        func_name = func.__name__
        if func_name in self.exts:
            raise DuplicatedExtension
        self.exts[func_name] = func
        return func