code: def test_pong(self):
      env = gym.make("PongNoFrameskip-v4", full_action_space=True)
      env = gym_wrapper.GymAtariAdapter(env)
  
      # Test converted observation spec. This should expose (RGB, LIVES).
      observation_spec = env.observation_spec()
      self.assertEqual(type(observation_spec[0]), specs.BoundedArray)
      self.assertEqual(type(observation_spec[1]), specs.Array)
  
      # Test converted action spec.
      action_spec: specs.DiscreteArray = env.action_spec()[0]
      self.assertEqual(type(action_spec), specs.DiscreteArray)
      self.assertEqual(action_spec.shape, ())
      self.assertEqual(action_spec.minimum, 0)
      self.assertEqual(action_spec.maximum, 17)
      self.assertEqual(action_spec.num_values, 18)
      self.assertEqual(action_spec.dtype, np.dtype("int64"))
  
      # Test step.
      timestep = env.reset()
      self.assertTrue(timestep.first())
      _ = env.step([np.array(0)])
      env.close()
  
file_path: acme/acme/wrappers/gym_wrapper_test.py
imports: import unittest
  from dm_env import specs
  import numpy
  from absl.testing import absltest
label_desc: Use image node_id 1 for calling the AtariGymWrapperTest obj's underlying member method code with example usage: obj.test_pong() without return types