def METHOD_NAME(self, name):
    if name in self.module_dict:
        raise KeyError(f'{name} is already registered')
    def _register(func):
        self.module_dict[name] = func
        return func
    return _register