class_docstr: For test code - build a dummy ResponseObservation proto.
docstr: Builds and returns a proto ResponseObservation.
docstr_tok: ["Builds","and","returns","a","proto","ResponseObservation","."]
code: def build(self):
      """Builds and returns a proto ResponseObservation."""
      response_observation = sc_pb.ResponseObservation()
      obs = response_observation.observation
  
      obs.game_loop = self._game_loop
      obs.player_common.CopyFrom(self._player_common)
  
      obs.abilities.add(ability_id=1, requires_point=True)  # Smart
  
      obs.score.score = self._score
      obs.score.score_details.CopyFrom(self._score_details)
  
      def fill(image_data, size, bits):
          image_data.bits_per_pixel = bits
          image_data.size.y = size[0]
          image_data.size.x = size[1]
          image_data.data = b"\0" * int(
              math.ceil(size[0] * size[1] * bits / 8)
          )
  
      if "feature_screen" in self._obs_spec:
          for feature in features.SCREEN_FEATURES:
              fill(
                  getattr(obs.feature_layer_data.renders, feature.name),
                  self._obs_spec["feature_screen"][1:],
                  8,
              )
  
      if "feature_minimap" in self._obs_spec:
          for feature in features.MINIMAP_FEATURES:
              fill(
                  getattr(
                      obs.feature_layer_data.minimap_renders,
                      feature.name,
                  ),
                  self._obs_spec["feature_minimap"][1:],
                  8,
              )
  
      if "rgb_screen" in self._obs_spec:
          fill(
              obs.render_data.map, self._obs_spec["rgb_screen"][:2], 24
          )
  
      if "rgb_minimap" in self._obs_spec:
          fill(
              obs.render_data.minimap,
              self._obs_spec["rgb_minimap"][:2],
              24,
          )
  
      if self._single_select:
          self._single_select.fill(obs.ui_data.single.unit)
  
      if self._multi_select:
          for unit in self._multi_select:
              obs.ui_data.multi.units.add(**unit.as_dict())
  
      if self._build_queue:
          for unit in self._build_queue:
              obs.ui_data.production.build_queue.add(**unit.as_dict())
  
      if self._production:
          for item in self._production:
              obs.ui_data.production.production_queue.add(**item)
  
      if self._feature_units:
          for tag, feature_unit in enumerate(self._feature_units, 1):
              args = dict(tag=tag)
              args.update(feature_unit.as_dict())
              obs.raw_data.units.add(**args)
  
      return response_observation
  
imports: import math
  import numpy
  from pysc2.lib import features
  from s2clientprotocol import raw_pb2
  from s2clientprotocol import sc2api_pb2
  from s2clientprotocol import score_pb2
label_desc: Use image node_id 12 for calling the Builder obj's underlying member method code with example usage: obj.build() and returns: response_observation