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: Abort the rollout (intended to be called from a thread).
docstr_tok: ["Abort","the","rollout","(","intended","to","be","called","from","a","thread",")","."]
code: def set_abort(self):
      """Abort the rollout (intended to be called from a thread)."""
      self.abort = True
  
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 2 for calling the ESRolloutWorkerWrapper obj's underlying member method code with example usage: obj.set_abort() without return types