class_docstr: The rollout generation is bound to a single worker environment by implementing it as a Wrapper class.
class_docstr_tok: ["The","rollout","generation","is","bound","to","a","single","worker","environment","by","implementing","it","as","a","Wrapper","class","."]
docstr: Avoid calling this constructor directly, use :method:`wrap` instead.
docstr_tok: ["Avoid","calling","this","constructor","directly",",","use",":","method",":","`","wrap","`","instead","."]
code: def __init__(
      self,
      env: Union[StructuredEnv, LogStatsEnv],
      shared_noise: SharedNoiseTable,
      agent_instance_seed: int,
  ):
      """Avoid calling this constructor directly, use :method:`wrap` instead."""
      super().__init__(env)
  
      self.shared_noise = shared_noise
      self.abort = False
      self.wrapper_rng = np.random.RandomState(agent_instance_seed)
  
imports: import itertools
  import logging
  import time
  from typing import TypeVar, Union
  import numpy
  import torch
  from maze.core.agent.policy import Policy
  from maze.core.agent.torch_model import TorchModel
  from maze.core.env.structured_env import StructuredEnv
  from maze.core.log_stats.log_stats import LogStatsLevel
  from maze.core.log_stats.log_stats_env import LogStatsEnv
  from maze.core.wrappers.wrapper import Wrapper
  from maze.perception.perception_utils import convert_to_numpy
  from maze.train.trainers.es.distributed.es_distributed_rollouts import ESRolloutResult
  from maze.train.trainers.es.es_shared_noise_table import SharedNoiseTable
  from maze.train.trainers.es.es_utils import get_flat_parameters, set_flat_parameters
label_desc: Use image node_id 1 to create a new ESRolloutWorkerWrapper object from inherited base classes: Wrapper with example: obj = ESRolloutWorkerWrapper(env, shared_noise, agent_instance_seed)