code: def connect(self, name, callback):
          '''Add callback to hook.'''
          if not self._callbacks[name]:
              self._callbacks[name] = callback
          else:
              raise HookAlreadyConnectedError('Callback hook already connected.'f connect(self, name, callback):
          '''Add callback to hook.'''
          if not self._callbacks[name]:
              self._callbacks[name] = callback
          else:
              raise HookAlreadyConnectedError('Callback hook already connected.')
docs: Add callback to hook.