docstr: Downsample images by a factor of ratio
docstr_tok: ["Downsample","images","by","a","factor","of","ratio"]
code: def __init__(self, env):
      """
      Downsample images by a factor of ratio
      """
      gym.ObservationWrapper.__init__(self, env)
      (oldh, oldw, _oldc) = env.observation_space.shape
      self.observation_space = gym.spaces.Box(
          low=0, high=255, shape=(oldh, oldw, 1), dtype=np.uint8
      )
  
imports: from collections import deque
  import cv2
  from .atari_wrappers import WarpFrame, ClipRewardEnv, FrameStack, ScaledFloatFrame
  from .wrappers import TimeLimit
  import numpy
  import gym
label_desc: Use image node_id 1 to create a new Rgb2gray object from inherited base classes: gym with example: obj = Rgb2gray(env)