code: def add_outer_dims_nest(structure, outer_dims):
      def add_outer_dims(spec):
          name = spec.name
          shape = outer_dims + spec.shape
          if hasattr(spec, "minimum") and hasattr(spec, "maximum"):
              return BoundedArraySpec(
                  shape, spec.dtype, spec.minimum, spec.maximum, name
              )
          return ArraySpec(shape, spec.dtype, name=name)
  
      return tf.nest.map_structure(add_outer_dims, structure)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numbers
  import gin
  import numpy
  import tensorflow
label_desc: Use image node_id 5 for calling a global function with example usage: add_outer_dims_nest(structure, outer_dims) and returns: tf, ArraySpec, BoundedArraySpec