class_docstr: A Starcraft II environment.
  
  The implementation details of the action and observation specs are in
  lib/features.py
code: def _finalize(self, visualize):
      self._delayed_actions = [
          collections.deque() for _ in self._action_delay_fns
      ]
  
      if visualize:
          self._renderer_human = renderer_human.RendererHuman()
          self._renderer_human.init(
              self._controllers[0].game_info(),
              self._controllers[0].data(),
          )
      else:
          self._renderer_human = None
  
      self._metrics = metrics.Metrics(self._map_name)
      self._metrics.increment_instance()
  
      self._last_score = None
      self._total_steps = 0
      self._episode_steps = 0
      self._episode_count = 0
      self._obs = [None] * self._num_agents
      self._agent_obs = [None] * self._num_agents
      self._state = (
          environment.StepType.LAST
      )  # Want to jump to `reset`.
      logging.info("Environment is ready")
  
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 2 for calling the SC2Env obj's underlying member method code with example usage: obj._finalize(visualize) without return types