docstr: Asserts a restart occurs only every `period` steps.
docstr_tok: ["Asserts","a","restart","occurs","only","every","`","period","`","steps","."]
code: def assertRestartsOnPeriod(
      self,
      indicator: restart_query.RestartIndicator,
      state: tf.Tensor,
      total_steps: int,
      period: int,
      offset: int,
  ):
      """Asserts a restart occurs only every `period` steps."""
      for step in range(total_steps):
          flag, state = indicator.next(state)
          if step % period == offset - 1:
              self.assertTrue(flag)
          else:
              self.assertFalse(flag)
  
imports: import unittest
  from absl.testing import parameterized
  import tensorflow
  from tensorflow_privacy.privacy.dp_query import restart_query
  from tensorflow_privacy.privacy.dp_query import tree_aggregation_query
label_desc: Use image node_id 1 for calling the RoundRestartIndicatorTest obj's underlying member method code with example usage: obj.assertRestartsOnPeriod(indicator, state, total_steps, period, offset) without return types