class_docstr: Optimized version of SubprocVecEnv that uses shared variables to communicate observations.
class_docstr_tok: ["Optimized","version","of","SubprocVecEnv","that","uses","shared","variables","to","communicate","observations","."]
code: def step_wait(self):
      outs = [pipe.recv() for pipe in self.parent_pipes]
      self.waiting_step = False
      obs, rews, dones, infos = zip(*outs)
      return (
          self._decode_obses(obs),
          np.array(rews),
          np.array(dones),
          infos,
      )
  
file_path: baselines/baselines/common/vec_env/shmem_vec_env.py
imports: import multiprocessing
  import numpy
  from .vec_env import VecEnv, CloudpickleWrapper, clear_mpi_env_vars
  import ctypes
  from baselines import logger
  from .util import dict_to_obs, obs_space_info, obs_to_dict
label_desc: Use image node_id 4 for calling the ShmemVecEnv obj's underlying member method code with example usage: obj.step_wait() and returns: self,  np,  np,  infos