code: def get_environment_spec(
      converter_settings: converter_pb2.ConverterSettings,
  ) -> EnvironmentSpec:
      """Gets observation and action spec for the specified converter settings.
  
      Args:
        converter_settings: The converter settings to get specs for.
  
      Returns:
        (observation spec, action spec).
      """
      env_info = converter_pb2.EnvironmentInfo(
          game_info=_dummy_game_info()
      )
      cvr = converter_lib.Converter(converter_settings, env_info)
      obs_spec = tree.map_structure(
          squeeze_spec_if_necessary, cvr.observation_spec()
      )
      return EnvironmentSpec(obs_spec, cvr.action_spec())
  
imports: import functools
  import threading
  from typing import Any, Mapping, NamedTuple, Sequence
  import dm_env
  import numpy
  from pysc2.env.converter import converter
  from pysc2.env.converter.proto import converter_pb2
  from pysc2.lib import actions
  import tree
  import typing_extensions
  from s2clientprotocol import common_pb2
  from s2clientprotocol import raw_pb2
  from s2clientprotocol import sc2api_pb2
label_desc: Use image node_id 5 for calling a global function with example usage: get_environment_spec(converter_settings) and returns: EnvironmentSpec