class_docstr: Vectorized Environment Wrapper for MB-MPO.
  
  Primary change is in the `vector_step` method, which calls the dynamics
  models for next_obs "calculation" (instead of the actual env). Also, the
  actual envs need to have two extra methods implemented: `reward(obs)` and
  (optionally) `done(obs)`. If `done` is not implemented, we will assume
  that episodes in the env do not terminate, ever.
class_docstr_tok: ["Vectorized","Environment","Wrapper","for","MB-MPO",".","Primary","change","is","in","the","`","vector_step","`","method",",","which","calls","the","dynamics","models","for","next_obs","``","calculation","''","(","instead","of","the","actual","env",")",".","Also",",","the","actual","envs","need","to","have","two","extra","methods","implemented",":","`","reward","(","obs",")","`","and","(","optionally",")","`","done","(","obs",")","`",".","If","`","done","`","is","not","implemented",",","we","will","assume","that","episodes","in","the","env","do","not","terminate",",","ever","."]
code: def __init__(
      self,
      make_env=None,
      existing_envs=None,
      num_envs=1,
      *,
      observation_space=None,
      action_space=None,
      env_config=None,
  ):
      self.make_env = make_env
      self.envs = existing_envs
      self.num_envs = num_envs
      while len(self.envs) < num_envs:
          self.envs.append(self.make_env(len(self.envs)))
      self._timesteps = [0 for _ in range(self.num_envs)]
      self.cur_obs = [None for _ in range(self.num_envs)]
  
      super().__init__(
          observation_space=observation_space
          or self.envs[0].observation_space,
          action_space=action_space or self.envs[0].action_space,
          num_envs=num_envs,
      )
      worker = get_global_worker()
      self.model, self.device = worker.foreach_policy(
          lambda x, y: (x.dynamics_model, x.device)
      )[0]
  
file_path: ray/python/ray/rllib/env/wrappers/model_vector_env.py
imports: import logging
  from gymnasium.spaces import Discrete
  import numpy
  from ray.rllib.utils.annotations import override
  from ray.rllib.env.vector_env import VectorEnv
  from ray.rllib.evaluation.rollout_worker import get_global_worker
  from ray.rllib.env.base_env import BaseEnv, convert_to_base_env
  from ray.rllib.utils.typing import EnvType
label_desc: Use image node_id 1 to create a new _VectorizedModelGymEnv object from inherited base classes: VectorEnv with example: obj = _VectorizedModelGymEnv(make_env, existing_envs, num_envs)