code: def _run_hooked_methods(self, hook: str):
          
          for method in self._potentially_hooked_methods:
              for callback_specs in method._hooked:
                  if callback_specs['hook'] != hook:
                      continue
  
                  when = callback_specs.get('when')
  
                  if when:
                      if self._check_callback_conditions(callback_specs):
                          method()
                  else:
                      method()
docs: Iterate through decorated methods to find those that should be
              triggered by the current hook. If conditions exist, check them before
              running otherwise go ahead and run.