code: def _normalize_array(array: specs.Array) -> specs.Array:
      """Converts bounded arrays with (-inf,+inf) bounds to unbounded arrays.
  
      The returned array should be mostly equivalent to the input, except that
      `generate_value()` returns -infs on arrays bounded to (-inf,+inf) and zeros
      on unbounded arrays.
  
      Args:
        array: the array to be normalized.
  
      Returns:
        normalized array.
      """
      if isinstance(array, specs.DiscreteArray):
          return array
      if not isinstance(array, specs.BoundedArray):
          return array
      if not (array.minimum == float("-inf")).all():
          return array
      if not (array.maximum == float("+inf")).all():
          return array
      return specs.Array(array.shape, array.dtype, array.name)
  
imports: import threading
  from typing import List, Mapping, Optional, Sequence, Callable, Iterator
  from acme import core
  from acme import specs
  from acme import types
  from acme import wrappers
  import dm_env
  import numpy
  import reverb
  from rlds import rlds_types
  import tensorflow
  import tree
label_desc: Use image node_id 2 for calling a global function with example usage: _normalize_array(array) and returns: specs, array, array, array, array