docstr: Warp frames to the specified size (dim x dim).
docstr_tok: ["Warp","frames","to","the","specified","size","(","dim","x","dim",")","."]
code: def __init__(self, env, dim):
      """Warp frames to the specified size (dim x dim)."""
      gym.ObservationWrapper.__init__(self, env)
      self.width = dim
      self.height = dim
      self.observation_space = spaces.Box(
          low=0,
          high=255,
          shape=(self.height, self.width),
          dtype=np.uint8,
      )
  
imports: import time
  import numpy
  from collections import deque
  import gym
  from gym import spaces
  from parl.env.compat_wrappers import CompatWrapper, is_gym_version_ge, V_NPRANDOM_CHANGED
  import cv2
label_desc: Use image node_id 1 to create a new WarpFrame object from inherited base classes: gym with example: obj = WarpFrame(env, dim)