code: def handle_pre_response(self, item_session: ItemSession) -> Actions:
          '''Process a response that is starting.'''
          action = self.consult_pre_response_hook(item_session)
  
          if action == Actions.RETRY:
              item_session.set_status(Status.skipped)
          elif action == Actions.FINISH:
              item_session.set_status(Status.done)
          elif action == Actions.STOP:
              raise HookStop('Script requested immediate stop.')
  
          return actiof handle_pre_response(self, item_session: ItemSession) -> Actions:
          '''Process a response that is starting.'''
          action = self.consult_pre_response_hook(item_session)
  
          if action == Actions.RETRY:
              item_session.set_status(Status.skipped)
          elif action == Actions.FINISH:
              item_session.set_status(Status.done)
          elif action == Actions.STOP:
              raise HookStop('Script requested immediate stop.')
  
          return action
docs: Process a response that is starting.