code: def handle_document(self, item_session: ItemSession, filename: str) -> Actions:
          '''Process a successful document response.
  
          Returns:
              A value from :class:`.hook.Actions`.
          '''
          self._waiter.reset()
  
          action = self.handle_response(item_session)
  
          if action == Actions.NORMAL:
              self._statistics.increment(item_session.response.body.size())
              item_session.set_status(Status.done, filename=filename)
  
          return actiof handle_document(self, item_session: ItemSession, filename: str) -> Actions:
          '''Process a successful document response.
  
          Returns:
              A value from :class:`.hook.Actions`.
          '''
          self._waiter.reset()
  
          action = self.handle_response(item_session)
  
          if action == Actions.NORMAL:
              self._statistics.increment(item_session.response.body.size())
              item_session.set_status(Status.done, filename=filename)
  
          return action
docs: Process a successful document response.
  
          Returns:
              A value from :class:`.hook.Actions`.