code: def __init__(
      self,
      level: LevelSelection,
      frame_skip: int,
      visualization_parameters: VisualizationParameters,
      target_success_rate: float = 1.0,
      seed: Union[None, int] = None,
      human_control: bool = False,
      custom_reward_threshold: Union[int, float] = None,
      screen_size: int = 84,
      minimap_size: int = 64,
      feature_minimap_maps_to_use: List = range(7),
      feature_screen_maps_to_use: List = range(17),
      observation_type: StarcraftObservationType = StarcraftObservationType.Features,
      disable_fog: bool = False,
      auto_select_all_army: bool = True,
      use_full_action_space: bool = False,
      **kwargs,
  ):
      super().__init__(
          level,
          seed,
          frame_skip,
          human_control,
          custom_reward_threshold,
          visualization_parameters,
          target_success_rate,
      )
  
      self.screen_size = screen_size
      self.minimap_size = minimap_size
      self.feature_minimap_maps_to_use = feature_minimap_maps_to_use
      self.feature_screen_maps_to_use = feature_screen_maps_to_use
      self.observation_type = observation_type
      self.features_screen_size = None
      self.feature_minimap_size = None
      self.rgb_screen_size = None
      self.rgb_minimap_size = None
      if self.observation_type == StarcraftObservationType.Features:
          self.features_screen_size = screen_size
          self.feature_minimap_size = minimap_size
      elif self.observation_type == StarcraftObservationType.RGB:
          self.rgb_screen_size = screen_size
          self.rgb_minimap_size = minimap_size
      self.disable_fog = disable_fog
      self.auto_select_all_army = auto_select_all_army
      self.use_full_action_space = use_full_action_space
  
      # step_mul is the equivalent to frame skipping. Not sure if it repeats actions in between or not though.
      self.env = sc2_env.SC2Env(
          map_name=self.env_id,
          step_mul=frame_skip,
          visualize=self.is_rendered,
          agent_interface_format=sc2_env.AgentInterfaceFormat(
              feature_dimensions=sc2_env.Dimensions(
                  screen=self.features_screen_size,
                  minimap=self.feature_minimap_size,
              )
              # rgb_dimensions=sc2_env.Dimensions(
              #     screen=self.rgb_screen_size,
              #     minimap=self.rgb_screen_size
              # )
          ),
          # feature_screen_size=self.features_screen_size,
          # feature_minimap_size=self.feature_minimap_size,
          # rgb_screen_size=self.rgb_screen_size,
          # rgb_minimap_size=self.rgb_screen_size,
          disable_fog=disable_fog,
          random_seed=self.seed,
      )
  
      # print all the available actions
      # self.env = available_actions_printer.AvailableActionsPrinter(self.env)
  
      self.reset_internal_state(True)
  
      """
          feature_screen:  [height_map, visibility_map, creep, power, player_id, player_relative, unit_type, selected,
                            unit_hit_points, unit_hit_points_ratio, unit_energy, unit_energy_ratio, unit_shields,
                            unit_shields_ratio, unit_density, unit_density_aa, effects]
          feature_minimap: [height_map, visibility_map, creep, camera, player_id, player_relative, selecte
          d]
          player:          [player_id, minerals, vespene, food_cap, food_army, food_workers, idle_worker_dount,
                            army_count, warp_gate_count, larva_count]
          """
      self.screen_shape = np.array(
          self.env.observation_spec()[0]["feature_screen"]
      )
      self.screen_shape[0] = len(self.feature_screen_maps_to_use)
      self.minimap_shape = np.array(
          self.env.observation_spec()[0]["feature_minimap"]
      )
      self.minimap_shape[0] = len(self.feature_minimap_maps_to_use)
      self.state_space = StateSpace(
          {
              "screen": PlanarMapsObservationSpace(
                  shape=self.screen_shape,
                  low=0,
                  high=255,
                  channels_axis=0,
              ),
              "minimap": PlanarMapsObservationSpace(
                  shape=self.minimap_shape,
                  low=0,
                  high=255,
                  channels_axis=0,
              ),
              "measurements": VectorObservationSpace(
                  self.env.observation_spec()[0]["player"][0]
              ),
          }
      )
      if self.use_full_action_space:
          action_identifiers = list(self.env.action_spec()[0].functions)
          num_action_identifiers = len(action_identifiers)
          action_arguments = [
              (arg.name, arg.sizes)
              for arg in self.env.action_spec()[0].types
          ]
          sub_action_spaces = [
              DiscreteActionSpace(num_action_identifiers)
          ]
          for argument in action_arguments:
              for dimension in argument[1]:
                  sub_action_spaces.append(
                      DiscreteActionSpace(dimension)
                  )
          self.action_space = CompoundActionSpace(sub_action_spaces)
      else:
          self.action_space = BoxActionSpace(
              2,
              0,
              self.screen_size - 1,
              ["X-Axis, Y-Axis"],
              default_action=np.array(
                  [self.screen_size / 2, self.screen_size / 2]
              ),
          )
  
      self.target_success_rate = target_success_rate
  
imports: from enum import Enum
  from typing import Union, List
  import numpy
  from rl_coach.filters.observation.observation_move_axis_filter import ObservationMoveAxisFilter
  from rl_coach.environments.environment import Environment, EnvironmentParameters, LevelSelection
  from rl_coach.base_parameters import VisualizationParameters
  from rl_coach.spaces import BoxActionSpace, VectorObservationSpace, PlanarMapsObservationSpace, StateSpace, CompoundActionSpace, DiscreteActionSpace
  from rl_coach.filters.filter import InputFilter, OutputFilter
  from rl_coach.filters.observation.observation_rescale_to_size_filter import ObservationRescaleToSizeFilter
  from rl_coach.filters.action.linear_box_to_box_map import LinearBoxToBoxMap
  from rl_coach.filters.observation.observation_to_uint8_filter import ObservationToUInt8Filter
label_desc: Use image node_id 1 to create a new StarCraft2Environment object from inherited base classes: Environment with example: obj = StarCraft2Environment(level, frame_skip, visualization_parameters, target_success_rate, seed, human_control, custom_reward_threshold, screen_size, minimap_size, feature_minimap_maps_to_use, feature_screen_maps_to_use, observation_type, disable_fog, auto_select_all_army, use_full_action_space)