class_docstr: Compatible for different versions of gym, especially for `step()` and `reset()` APIs.
  
      .. code-block:: python
      # old version (< 0.26.0) of gym APIs
      observation = env.reset()
      observation, reward, done, info = env.step(action)
      # new version (>= 0.26.0) of gym APIs
      observation, info = env.reset()
      observation, reward, terminated, truncated, info = env.step(action)
  
  After being wrapped by `CompatWrapper`, the new version of the gym env can be used in the same way as the old version of gym.
code: def __init__(self, env):
      super().__init__(env)
      if hasattr(env, "_max_episode_steps"):
          self._max_episode_steps = int(self.env._max_episode_steps)
      if hasattr(env, "_elapsed_steps"):
          self._elapsed_steps = self.env._elapsed_steps
      self.count_ep_step = 0
      self.random_seed = "without_setting"
  
file_path: PARL/parl/env/compat_wrappers.py
imports: import gym
  import operator
label_desc: Use image node_id 1 to create a new CompatWrapper object from inherited base classes: gym with example: obj = CompatWrapper(env)