# tf_privacy.tree_aggregation.get_step_idx

<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/tree_aggregation.py#L191-L197) |

Returns the current leaf node index based on [`TreeState.level_buffer_idx`](https://www.tensorflow.org/responsible_ai/privacy/api_docs/python/tf_privacy/tree_aggregation/TreeState#level_buffer_idx).

    @tf.function
    tf_privacy.tree_aggregation.get_step_idx(
        state: https://www.tensorflow.org/responsible_ai/privacy/api_docs/python/tf_privacy/tree_aggregation/TreeState
    ) -> tf.Tensor