code: def test_adaptive_stddev(self, stddev_list, reset_frequency):
      # The stddev estimation follows a chi distribution. The confidence for
      # `sample_num` samples should be high, and we use a relatively large
      # tolerance to guard the numerical stability for small stddev values.
      sample_num, tolerance = 10000, 0.05
      g = tree_aggregation.GaussianNoiseGenerator(
          noise_std=1.0, specs=tf.TensorSpec([sample_num]), seed=2021
      )
      gstate = g.initialize()
      for stddev in stddev_list:
          gstate = g.make_state(
              gstate.seeds, tf.constant(stddev, dtype=tf.float32)
          )
          for _ in range(reset_frequency):
              prev_gstate = gstate
              value, gstate = g.next(gstate)
              print(tf.math.reduce_std(value), stddev)
              self.assertAllClose(
                  tf.math.reduce_std(value), stddev, rtol=tolerance
              )
              self.assertNotAllEqual(gstate.seeds, prev_gstate.seeds)
  
imports: import math
  import random
  from absl.testing import parameterized
  import tensorflow
  from tensorflow_privacy.privacy.dp_query import tree_aggregation
label_desc: Use image node_id 6 for calling the GaussianNoiseGeneratorTest obj's underlying member method code with example usage: obj.test_adaptive_stddev(stddev_list, reset_frequency) without return types