code: def testOuterDimsNestRemovesDimensionsFromSpecs(self, dtype):
      if dtype == tf.string:
          self.skipTest("Not compatible with string type.")
      nested_spec = example_nested_tensor_spec(dtype)
      larger_spec = tensor_spec.add_outer_dims_nest(nested_spec, (3, 4))
      removed_spec = tensor_spec.remove_outer_dims_nest(larger_spec, 2)
      self.assertEqual(nested_spec, removed_spec)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tf_agents.specs import array_spec
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
label_desc: Use image node_id 8 for calling the BoundedTensorSpecSampleTest obj's underlying member method code with example usage: obj.testOuterDimsNestRemovesDimensionsFromSpecs(dtype) without return types