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: Construct the `PeriodicRoundRestartIndicator`.
  
  Args:
    period: The `next` function will return `True` every `period` number of
      `next` calls.
    warmup: The first `True` will be returned at the `warmup` times call of
      `next`.
docstr_tok: ["Construct","the","`","PeriodicRoundRestartIndicator","`",".","Args",":","period",":","The","`","next","`","function","will","return","`","True","`","every","`","period","`","number","of","`","next","`","calls",".","warmup",":","The","first","`","True","`","will","be","returned","at","the","`","warmup","`","times","call","of","`","next","`","."]
code: def __init__(self, period: int, warmup: Optional[int] = None):
      """Construct the `PeriodicRoundRestartIndicator`.
  
      Args:
        period: The `next` function will return `True` every `period` number of
          `next` calls.
        warmup: The first `True` will be returned at the `warmup` times call of
          `next`.
      """
      if period < 1:
          raise ValueError(
              "Restart period should be equal or larger than 1, "
              f"got {period}"
          )
      if warmup is None:
          warmup = 0
      elif warmup <= 0 or warmup >= period:
          raise ValueError(
              f"Warmup must be between 1 and `period`-1={period-1}, "
              f"got {warmup}"
          )
      self.period = period
      self.warmup = warmup
  
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 1 to create a new PeriodicRoundRestartIndicator object from inherited base classes: RestartIndicator with example: obj = PeriodicRoundRestartIndicator(period, warmup)