code: def testNormalization(self, dtype):
      spec = tensor_spec.TensorSpec([3], dtype, "obs")
      dict_tensor_normalizer = (
          tensor_normalizer.StreamingTensorNormalizer(
              tensor_spec={"a": spec, "b": spec}
          )
      )
      self.evaluate(tf.compat.v1.global_variables_initializer())
      as_tensor = functools.partial(tf.convert_to_tensor, dtype=dtype)
  
      # Update with some initial values.
      norm_obs = {
          "a": np.random.randn(6, 2, 3),
          "b": np.random.randn(6, 2, 3),
      }
      norm_obs_t = tf.nest.map_structure(as_tensor, norm_obs)
      self.evaluate(dict_tensor_normalizer.update(norm_obs_t))
  
      view_obs = {
          "a": np.random.randn(4, 3),
          "b": np.random.randn(4, 3),
      }
      view_obs_t = tf.nest.map_structure(as_tensor, view_obs)
      observed = self.evaluate(
          dict_tensor_normalizer.normalize(
              view_obs_t, clip_value=-1, variance_epsilon=1e-6
          )
      )
  
      norm_obs_avg = tf.nest.map_structure(
          lambda a: a.mean(axis=(0, 1)), norm_obs
      )
      norm_obs_std = tf.nest.map_structure(
          lambda a: a.std(axis=(0, 1)), norm_obs
      )
      expected = tf.nest.map_structure(
          lambda obs, avg, std: (obs - avg) / std,
          view_obs,
          norm_obs_avg,
          norm_obs_std,
      )
  
      self.assertAllClose(observed, expected)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tf_agents.specs import tensor_spec
  from tf_agents.utils import tensor_normalizer
label_desc: Use image node_id 4 for calling the StreamingTensorNormalizerTest obj's underlying member method code with example usage: obj.testNormalization(dtype) without return types