class_docstr: Indicator for resetting the tree state after every a few number of queries.
  
  The indicator will maintain an internal counter as state.
class_docstr_tok: ["Indicator","for","resetting","the","tree","state","after","every","a","few","number","of","queries",".","The","indicator","will","maintain","an","internal","counter","as","state","."]
docstr: Gets next bool indicator and advances the state.
  
  Args:
    state: The current state.
  
  Returns:
    A pair (value, new_state) where value is the bool indicator and new_state
      of `state+1`.
docstr_tok: ["Gets","next","bool","indicator","and","advances","the","state",".","Args",":","state",":","The","current","state",".","Returns",":","A","pair","(","value",",","new_state",")","where","value","is","the","bool","indicator","and","new_state","of","`","state+1","`","."]
code: def next(self, state):
      """Gets next bool indicator and advances the state.
  
      Args:
        state: The current state.
  
      Returns:
        A pair (value, new_state) where value is the bool indicator and new_state
          of `state+1`.
      """
      period = tf.constant(self.period, tf.int32)
      warmup = tf.constant(self.warmup, tf.int32)
      state = state + tf.constant(1, tf.int32)
      flag = tf.math.equal(tf.math.floormod(state, period), warmup)
      return flag, state
  
imports: import abc
  import collections
  from typing import Optional
  import tensorflow
  from tensorflow_privacy.privacy.dp_query import dp_query
label_desc: Use image node_id 3 for calling the PeriodicRoundRestartIndicator obj's underlying member method code with example usage: obj.next(state) and returns: flag,  state