class_docstr: Test the apm values of various actions.
class_docstr_tok: ["Test","the","apm","values","of","various","actions","."]
docstr: Set up a game, yield, then check the apm in the replay.
docstr_tok: ["Set","up","a","game",",","yield",",","then","check","the","apm","in","the","replay","."]
code: def check_apm(self, name):
      """Set up a game, yield, then check the apm in the replay."""
      interface = sc_pb.InterfaceOptions(raw=True, score=False)
      interface.feature_layer.width = 24
      interface.feature_layer.resolution.x = 64
      interface.feature_layer.resolution.y = 64
      interface.feature_layer.minimap_resolution.x = 64
      interface.feature_layer.minimap_resolution.y = 64
  
      create = sc_pb.RequestCreateGame(
          random_seed=1,
          local_map=sc_pb.LocalMap(
              map_path=self._map_path, map_data=self._map_data
          ),
      )
      create.player_setup.add(type=sc_pb.Participant)
      create.player_setup.add(
          type=sc_pb.Computer,
          race=sc_common.Protoss,
          difficulty=sc_pb.VeryEasy,
      )
  
      join = sc_pb.RequestJoinGame(
          race=sc_common.Protoss, options=interface
      )
  
      self._controller.create_game(create)
      self._controller.join_game(join)
  
      self._info = self._controller.game_info()
      self._features = features.features_from_game_info(
          self._info, use_feature_units=True, use_raw_units=True
      )
      self._map_size = point.Point.build(self._info.start_raw.map_size)
  
      for i in range(60):
          yield i, self.step()
  
      data = self._controller.save_replay()
      replay_info = self._controller.replay_info(data)
      self._summary.append((name, replay_info))
  
imports: import random
  from absl import app
  from pysc2 import maps
  from pysc2 import run_configs
  from pysc2.lib import actions
  from pysc2.lib import features
  from pysc2.lib import point
  from pysc2.lib import units
  from s2clientprotocol import common_pb2
  from s2clientprotocol import error_pb2
  from s2clientprotocol import sc2api_pb2
label_desc: Use image node_id 10 for calling the Env obj's underlying member method code with example usage: obj.check_apm(name) without return types