code: def build_mean_std_normalizer(
      nested_spec: types.NestedSpec,
      max_abs_value: Optional[float] = None,
  ) -> NormalizationFns:
      """Builds pure functions used for normalizing based on mean and std.
  
      Arguments:
        nested_spec: A nested spec where all leaves have float dtype
        max_abs_value: Normalized nested arrays will be clipped so that all values
          will be between -max_abs_value and +max_abs_value. Setting to None
          (default) does not perform this clipping.
  
      Returns:
        NormalizationFns to be used for normalization
      """
  
      def init() -> RunningStatisticsState:
          return running_statistics.init_state(nested_spec)
  
      def normalize(
          nested_array: types.NestedArray,
          params: RunningStatisticsState,
      ) -> types.NestedArray:
          return running_statistics.normalize(
              nested_array, params, max_abs_value=max_abs_value
          )
  
      def update(
          params: RunningStatisticsState,
          nested_array: types.NestedArray,
          pmap_axis_name: Optional[str],
      ) -> RunningStatisticsState:
          return running_statistics.update(
              params, nested_array, pmap_axis_name=pmap_axis_name
          )
  
      return NormalizationFns(
          init=init, normalize=normalize, update=update
      )
  
imports: import dataclasses
  from typing import Any, Callable, Generic, NamedTuple, Optional
  from acme import adders
  from acme import types
  from acme.agents.jax import actor_core
  from acme.agents.jax import actors
  from acme.jax import networks
  from acme.jax import running_statistics
  from acme.jax import utils
  from acme.jax import variable_utils
  import jax
  import jax.numpy
label_desc: Use image node_id 2 for calling a global function with example usage: build_mean_std_normalizer(nested_spec, max_abs_value) and returns: NormalizationFns, running_statistics, running_statistics, running_statistics