code: def _get_score(agent_obs, score_index=0):
      if isinstance(agent_obs, sc_pb.ResponseObservation):
          if score_index != 0:
              raise ValueError(
                  "Non-zero score index isn't supported for passthrough agents, "
                  "currently"
              )
          return agent_obs.observation.score.score
      else:
          return agent_obs["score_cumulative"][score_index]
  
imports: import collections
  import copy
  import random
  import time
  from absl import logging
  from pysc2 import maps
  from pysc2 import run_configs
  from pysc2.env import enums
  from pysc2.env import environment
  from pysc2.lib import actions
  from pysc2.lib import features
  from pysc2.lib import metrics
  from pysc2.lib import portspicker
  from pysc2.lib import renderer_human
  from pysc2.lib import run_parallel
  from pysc2.lib import stopwatch
  from s2clientprotocol import sc2api_pb2
label_desc: Use image node_id 5 for calling a global function with example usage: _get_score(agent_obs, score_index) and returns: agent_obs, agent_obs