Adds outer dimensions to the shape of input specs.

specs Nested list/tuple/dict of TensorSpecs/ArraySpecs, describing the shape of tensors.
outer_dims a list or tuple, representing the outer shape to be added to the TensorSpecs in specs.

Nested TensorSpecs with outer dimensions added to the shape of input specs.

ValueError if any outer_dims is neither a list nor tuple.