code: def test_wrapped_cartpole_specs(self):
      # Note we use spec.make on gym envs to avoid getting a TimeLimit wrapper on
      # the environment.
      cartpole_env = gym.spec("CartPole-v1").make()
      env = gym_wrapper.GymnasiumWrapper(cartpole_env)
  
      action_spec = env.action_spec()
      self.assertEqual((), action_spec.shape)
      self.assertEqual(0, action_spec.minimum)
      self.assertEqual(1, action_spec.maximum)
  
      observation_spec = env.observation_spec()
      self.assertEqual((4,), observation_spec.shape)
      self.assertEqual(np.float32, observation_spec.dtype)
      high = np.array(
          [
              4.8,
              np.finfo(np.float32).max,
              2 / 15.0 * math.pi,
              np.finfo(np.float32).max,
          ]
      )
      np.testing.assert_array_almost_equal(
          -high, observation_spec.minimum
      )
      np.testing.assert_array_almost_equal(
          high, observation_spec.maximum
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  from absl.testing.absltest import mock
  import gymnasium
  import numpy
  from tf_agents.environments import gymnasium_wrapper
  from tf_agents.utils import test_utils
label_desc: Use image node_id 1 for calling the GymnasiumWrapperOnCartpoleTest obj's underlying member method code with example usage: obj.test_wrapped_cartpole_specs() without return types