# tf_privacy.restart_query.PeriodicRoundRestartIndicator

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/privacy/blob/v0.9.0/privacy/privacy/dp_query/restart_query.py#L58-L102) |

Indicator for resetting the tree state after every a few number of queries.

Inherits From: [`RestartIndicator`](https://www.tensorflow.org/responsible_ai/privacy/api_docs/python/tf_privacy/restart_query/RestartIndicator)

    tf_privacy.restart_query.PeriodicRoundRestartIndicator(
        period: int, warmup: Optional[int] = None
    )

The indicator will maintain an internal counter as state.

<br />

<br />

<br />

| ## 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`. |

<br />

## Methods

### `initialize`

[View source](https://github.com/tensorflow/privacy/blob/v0.9.0/privacy/privacy/dp_query/restart_query.py#L84-L86)

    initialize()

Returns initialized state of 0 for `PeriodicRoundRestartIndicator`.

### `next`

[View source](https://github.com/tensorflow/privacy/blob/v0.9.0/privacy/privacy/dp_query/restart_query.py#L88-L102)

    next(
        state
    )

Gets next bool indicator and advances the state.

<br />

<br />

<br />

| Args ||
|---|---|
| `state` | The current state. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| A pair (value, new_state) where value is the bool indicator and new_state of `state+1`. ||

<br />