class_docstr: ViZDoom environments return dictionaries as observations, containing
  the main image as well other info.
  The image is also too large for normal training.
  
  This wrapper replaces the dictionary observation space with a simple
  Box space (i.e., only the RGB image), and also resizes the image to a
  smaller size.
  
  NOTE: Ideally, you should set the image size to smaller in the scenario files
        for faster running of ViZDoom. This can really impact performance,
        and this code is pretty slow because of this!
class_docstr_tok: ["ViZDoom","environments","return","dictionaries","as","observations",",","containing","the","main","image","as","well","other","info",".","The","image","is","also","too","large","for","normal","training",".","This","wrapper","replaces","the","dictionary","observation","space","with","a","simple","Box","space","(","i.e.",",","only","the","RGB","image",")",",","and","also","resizes","the","image","to","a","smaller","size",".","NOTE",":","Ideally",",","you","should","set","the","image","size","to","smaller","in","the","scenario","files","for","faster","running","of","ViZDoom",".","This","can","really","impact","performance",",","and","this","code","is","pretty","slow","because","of","this","!"]
code: def __init__(self, env, shape=IMAGE_SHAPE):
      super().__init__(env)
      self.image_shape = shape
      self.image_shape_reverse = shape[::-1]
      self.env.frame_skip = FRAME_SKIP
  
      # Create new observation space with the new shape
      print(env.observation_space)
      num_channels = env.observation_space["screen"].shape[-1]
      new_shape = (shape[0], shape[1], num_channels)
      self.observation_space = gymnasium.spaces.Box(
          0, 255, shape=new_shape, dtype=np.uint8
      )
  
file_path: ViZDoom/examples/python/learning_stable_baselines3.py
imports: from argparse import ArgumentParser
  import cv2
  import gymnasium
  import numpy
  from stable_baselines3 import PPO
  from stable_baselines3.common.env_util import make_vec_env
  import vizdoom.gymnasium_wrapper
label_desc: Use image node_id 1 to create a new ObservationWrapper object from inherited base classes: gymnasium with example: obj = ObservationWrapper(env, shape)