code: def test_action_spec(self):
      cvr = converter.Converter(
          settings=_make_converter_settings("visual"),
          environment_info=_make_dummy_env_info(),
      )
  
      action_spec = cvr.action_spec()
      self.assertCountEqual(
          action_spec,
          [
              "build_queue_id",
              "control_group_act",
              "control_group_id",
              "minimap",
              "queued",
              "screen",
              "screen2",
              "select_add",
              "select_point_act",
              "select_unit_act",
              "select_unit_id",
              "select_worker",
              "unload_id",
              "delay",
              "function",
          ],
      )
  
      for k, v in action_spec.items():
          self.assertEqual(k, v.name, msg=k)
          self.assertEqual(v.dtype, np.int32, msg=k)
          self.assertEqual(v.shape, (), msg=k)
          self.assertEqual(
              v.minimum, (1,) if (k == "delay") else (0,), msg=k
          )
  
      for k, v in {
          "build_queue_id": 9,
          "control_group_act": 4,
          "control_group_id": 9,
          "minimap": MINIMAP_SIZE * MINIMAP_SIZE - 1,
          "queued": 1,
          "screen": SCREEN_SIZE * SCREEN_SIZE - 1,
          "screen2": SCREEN_SIZE * SCREEN_SIZE - 1,
          "select_add": 1,
          "select_point_act": 3,
          "select_unit_act": 3,
          "select_unit_id": 499,
          "select_worker": 3,
          "unload_id": 499,
          "delay": 127,
          "function": NUM_ACTION_TYPES - 1,
      }.items():
          self.assertEqual(action_spec[k].maximum, (v,), msg=k)
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from pysc2.env.converter import converter
  from pysc2.env.converter.proto import converter_pb2
  from s2clientprotocol import common_pb2
  from s2clientprotocol import raw_pb2
  from s2clientprotocol import sc2api_pb2
  from s2clientprotocol import spatial_pb2
label_desc: Use image node_id 1 for calling the VisualConverterTest obj's underlying member method code with example usage: obj.test_action_spec() without return types