code: def register(self, name: str):
          '''Register hooks that can be connected.'''
          if name in self._callbacks:
              raise ValueError('Hook already registered')
  
          self._callbacks[name] = None
  
          if self._event_dispatcher is not None:
              self._event_dispatcher.register(namef register(self, name: str):
          '''Register hooks that can be connected.'''
          if name in self._callbacks:
              raise ValueError('Hook already registered')
  
          self._callbacks[name] = None
  
          if self._event_dispatcher is not None:
              self._event_dispatcher.register(name)
docs: Register hooks that can be connected.