class_docstr: Gaussian noise generator with counter as pseudo state.
  
  Produces i.i.d. spherical Gaussian noise at each step shaped according to a
  nested structure of `tf.TensorSpec`s.
class_docstr_tok: ["Gaussian","noise","generator","with","counter","as","pseudo","state",".","Produces","i.i.d",".","spherical","Gaussian","noise","at","each","step","shaped","according","to","a","nested","structure","of","`","tf.TensorSpec","`","s","."]
docstr: Gets next value and advances the GaussianNoiseGenerator.
  
  Args:
    state: The current state (seed, noise_std).
  
  Returns:
    A tuple of (sample, new_state) where sample is a new sample and new_state
      is the advanced state (seed+1, noise_std).
docstr_tok: ["Gets","next","value","and","advances","the","GaussianNoiseGenerator",".","Args",":","state",":","The","current","state","(","seed",",","noise_std",")",".","Returns",":","A","tuple","of","(","sample",",","new_state",")","where","sample","is","a","new","sample","and","new_state","is","the","advanced","state","(","seed+1",",","noise_std",")","."]
code: def next(self, state):
      """Gets next value and advances the GaussianNoiseGenerator.
  
      Args:
        state: The current state (seed, noise_std).
  
      Returns:
        A tuple of (sample, new_state) where sample is a new sample and new_state
          is the advanced state (seed+1, noise_std).
      """
      flat_structure = tf.nest.flatten(self._specs)
      flat_seeds = [state.seeds + i for i in range(len(flat_structure))]
      nest_seeds = tf.nest.pack_sequence_as(self._specs, flat_seeds)
  
      def _get_noise(spec, seed):
          return tf.random.stateless_normal(
              shape=spec.shape, seed=seed, stddev=state.stddev
          )
  
      nest_noise = tf.nest.map_structure(
          _get_noise, self._specs, nest_seeds
      )
      return nest_noise, self._GlobalState(
          flat_seeds[-1] + 1, state.stddev
      )
  
imports: import abc
  import collections
  from typing import Any, Callable, Collection, NamedTuple, Optional, Tuple, Union
  import tensorflow
label_desc: Use image node_id 3 for calling the GaussianNoiseGenerator obj's underlying member method code with example usage: obj.next(state) and returns: nest_noise,  self, tf