code: def add_outer_dim(specs, dim=None):
      """Adds an outer dimension to the shape of input specs.
  
      Args:
        specs: Nested list/tuple/dict of TensorSpecs/ArraySpecs, describing the
          shape of tensors.
        dim: Int, representing the outer dimension to be added to the TensorSpecs in
          specs.
  
      Returns:
        Nested TensorSpecs with outer dimensions added to the shape of input specs.
      """
      return add_outer_dims_nest(specs, outer_dims=(dim,))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from typing import Union
  import numpy
  import tensorflow
  import tensorflow_probability
  from tf_agents.specs import array_spec
  from tf_agents.typing import types
  from google.protobuf import text_format
  from tensorflow.core.protobuf import struct_pb2
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.saved_model import nested_structure_coder
label_desc: Use image node_id 15 for calling a global function with example usage: add_outer_dim(specs, dim) and returns: add_outer_dims_nest