def __init__(self, env_fns):
self.envs = [fn() for fn in env_fns]<EOL>env = self.envs[<NUM_LIT:0>]<EOL>VecEnv.__init__(self, len(env_fns), env.observation_space, env.action_space)<EOL>obs_space = env.observation_space<EOL>self.keys, shapes, dtypes = obs_space_info(obs_space)<EOL>self.buf_obs = { k: np.zeros((self.num_envs,) + tuple(shapes[k]), dtype=dtypes[k]) for k in self.keys }<EOL>self.buf_dones = np.zeros((self.num_envs,), dtype=np.bool)<EOL>self.buf_rews  = np.zeros((self.num_envs,), dtype=np.float32)<EOL>self.buf_infos = [{} for _ in range(self.num_envs)]<EOL>self.actions = None<EOL>self.specs = [e.spec for e in self.envs]<EOL>
Arguments:
env_fns: iterable of callables      functions that build environments