docstr: return observation space: Dict with Box entry for each activated buffer:
    "screen", "depth", "labels", "automap", "gamevariables"
docstr_tok: ["return","observation","space",":","Dict","with","Box","entry","for","each","activated","buffer",":","``","screen","''",",","``","depth","''",",","``","labels","''",",","``","automap","''",",","``","gamevariables","''"]
code: def __get_observation_space(self):
      """
      return observation space: Dict with Box entry for each activated buffer:
        "screen", "depth", "labels", "automap", "gamevariables"
      """
      spaces = {
          "screen": gym.spaces.Box(
              0,
              255,
              (
                  self.game.get_screen_height(),
                  self.game.get_screen_width(),
                  self.channels,
              ),
              dtype=np.uint8,
          )
      }
  
      if self.depth:
          spaces["depth"] = gym.spaces.Box(
              0,
              255,
              (
                  self.game.get_screen_height(),
                  self.game.get_screen_width(),
                  1,
              ),
              dtype=np.uint8,
          )
  
      if self.labels:
          spaces["labels"] = gym.spaces.Box(
              0,
              255,
              (
                  self.game.get_screen_height(),
                  self.game.get_screen_width(),
                  1,
              ),
              dtype=np.uint8,
          )
  
      if self.automap:
          spaces["automap"] = gym.spaces.Box(
              0,
              255,
              (
                  self.game.get_screen_height(),
                  self.game.get_screen_width(),
                  # "automap" buffer uses same number of channels
                  # as the main screen buffer,
                  self.channels,
              ),
              dtype=np.uint8,
          )
  
      self.num_game_variables = (
          self.game.get_available_game_variables_size()
      )
      if self.num_game_variables > 0:
          spaces["gamevariables"] = gym.spaces.Box(
              np.finfo(np.float32).min,
              np.finfo(np.float32).max,
              (self.num_game_variables,),
              dtype=np.float32,
          )
  
      return gym.spaces.Dict(spaces)
  
imports: import itertools
  import warnings
  from typing import Optional
  import gym
  import numpy
  import pygame
  from gym.utils import EzPickle
  import vizdoom.vizdoom
label_desc: Use image node_id 15 for calling the VizdoomEnv obj's underlying member method code with example usage: obj.__get_observation_space() and returns: gym