code: def new_registry(attribute=None):
      
      registry = {}
  
      def register(key):
          def decorator(func):
              registry[key] = func
              if attribute:
                  setattr(func, attribute, key)
              return func
          return decorator
  
      return registry, register
docs: Returns an empty dict and a @register decorator.