code: def dispatch_event(self, event_, **kwargs):
          
          if self.settings.hooks_enabled:
              result = self.hooks.dispatch_event(event_, **kwargs)
              if result is not None:
                  return result
  
              # Must also dispatch the event in parent section
              if self.section:
                  return self.section.dispatch_event(event_, **kwargs)
  
          elif self.section:
              # Settings only apply to one section, so must still
              # dispatch the event in parent sections recursively.
              self.section.dispatch_event(event_, **kwargs)
docs: Dispatch section event.
  
          Notes:
              You MUST NOT call event.trigger() directly because
              it will circumvent the section settings as well
              as ignore the section tree.
  
              If hooks are disabled somewhere up in the tree, and enabled
              down below, events will still be dispatched down below because
              that's where they originate.