code: def handle(self, state, message=False):
          
          if message:
              if state != chatstates_xso.ChatState.ACTIVE:
                  raise ValueError(
                      "Only the state ACTIVE can be sent with messages."
                  )
          elif self._state == state:
              return False
  
          self._state = state
          return self._strategy.sending
docs: Handle a state update.
  
          :param state: the new chat state
          :type state: :class:`~aioxmpp.chatstates.ChatState`
  
          :param message: pass true to indicate that we handle the
                          :data:`ACTIVE` state that is implied by
                          sending a content message.
          :type message: :class:`bool`
  
          :returns: whether a standalone notification must be sent for
                    this state update, respective if a chat state
                    notification must be included with the message.
  
          :raises ValueError: if `message` is true and a state other
                              than :data:`ACTIVE` is passed.