code: def get_wrapper_by_cls(venv, cls):
      """Fetch env wrapper class cls from current venv
      Args:
          venv (gym.Wrapper): current env
          cls (gym.Wrapper): target env wrapper class
      """
      if isinstance(venv, cls):
          return venv
      elif hasattr(venv, "env"):
          return get_wrapper_by_cls(venv.env, cls)
  
      return None
  
imports: import numpy
  import gym
  import time
  from parl.env.compat_wrappers import CompatWrapper
label_desc: Use image node_id 1 for calling a global function with example usage: get_wrapper_by_cls(venv, cls) and returns: None, venv, get_wrapper_by_cls