code: def get_next_revision(self, session_id, revision, delta):
          
  
          session = self.sessions[session_id]
          session.state = State.connected
  
          if delta == revision:
              # Increment revision. Never decrement.
              session.revision = max(session.revision, revision)
  
              # Wait for next revision to become ready.
              self.next_revision_available.wait()
  
          return self.revision
docs: Determine the next revision number for a given session id, revision
          and delta.
  
          In case the client is up-to-date, this method will block until the next
          revision is available.
  
          :param int session_id: Session identifier
          :param int revision: Client revision number
          :param int delta: Client revision delta (old client version number)
          :return: Next revision number
          :rtype: int