class_docstr: Encapsulates tensor normalization and owns normalization variables.
  
  Example usage:
  
  ```
  tensor_normalizer = StreamingTensorNormalizer(
      tf.TensorSpec([], tf.float32))
  observation_list = [list of float32 scalars or batches]
  normalized_list = []
  
  for o in observation_list:
    normalized_list.append(tensor_normalizer.normalize(o))
    tensor_normalizer.update(o)
  ```
  
  For float64 inputs do:
  ```
  tensor_normalizer = StreamingTensorNormalizer(
      tf.TensorSpec([], tf.float64), dtype=tf.float64)
  observation_list = [list of float64 scalars or batches]
  
  for o in observation_list:
    normalized_list.append(tensor_normalizer.normalize(o))
    tensor_normalizer.update(o)
docstr: Initialize TensorNormalizer.
  
  Args:
    tensor_spec: The specs of the tensors to normalize.
    scope: Scope for the `tf.Module`.
docstr_tok: ["Initialize","TensorNormalizer",".","Args",":","tensor_spec",":","The","specs","of","the","tensors","to","normalize",".","scope",":","Scope","for","the","`","tf.Module","`","."]
code: def __init__(self, tensor_spec, scope="normalize_tensor"):
      """Initialize TensorNormalizer.
  
      Args:
        tensor_spec: The specs of the tensors to normalize.
        scope: Scope for the `tf.Module`.
      """
  
      super(TensorNormalizer, self).__init__(name=scope)
      self._scope = scope
      self._tensor_spec = tensor_spec
      self._flat_variable_spec = [
          self._map_spec_dtype(s) for s in tf.nest.flatten(tensor_spec)
      ]
      self._create_variables()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  from typing import Tuple
  import six
  import tensorflow
  from tf_agents.specs import tensor_spec
  from tf_agents.typing import types
  from tf_agents.utils import common
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 1 to create a new TensorNormalizer object from inherited base classes: tf with example: obj = TensorNormalizer(tensor_spec, scope)