class_docstr: A Starcraft II environment.
  
  The implementation details of the action and observation specs are in
  lib/features.py
code: def _get_interface(interface_format, require_raw):
      if isinstance(interface_format, sc_pb.InterfaceOptions):
          if require_raw and not interface_format.raw:
              interface_options = copy.deepcopy(interface_format)
              interface_options.raw = True
              return interface_options
          else:
              return interface_format
  
      aif = interface_format
      interface = sc_pb.InterfaceOptions(
          raw=(
              aif.use_feature_units
              or aif.use_unit_counts
              or aif.use_raw_units
              or require_raw
          ),
          show_cloaked=aif.show_cloaked,
          show_burrowed_shadows=aif.show_burrowed_shadows,
          show_placeholders=aif.show_placeholders,
          raw_affects_selection=True,
          raw_crop_to_playable_area=aif.raw_crop_to_playable_area,
          score=True,
      )
  
      if aif.feature_dimensions:
          interface.feature_layer.width = aif.camera_width_world_units
          aif.feature_dimensions.screen.assign_to(
              interface.feature_layer.resolution
          )
          aif.feature_dimensions.minimap.assign_to(
              interface.feature_layer.minimap_resolution
          )
          interface.feature_layer.crop_to_playable_area = (
              aif.crop_to_playable_area
          )
          interface.feature_layer.allow_cheating_layers = (
              aif.allow_cheating_layers
          )
  
      if aif.rgb_dimensions:
          aif.rgb_dimensions.screen.assign_to(
              interface.render.resolution
          )
          aif.rgb_dimensions.minimap.assign_to(
              interface.render.minimap_resolution
          )
  
      return interface
  
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 3 for calling the SC2Env obj's underlying member method code with example usage: obj._get_interface(interface_format, require_raw) and returns: interface, interface_options, interface_format