class_docstr: Common superclass for SAC runners, implementing the main training controls.
docstr: The individual runners implement the setup of the distributed training rollout actors.
  
  :param env_factory: Factory function for envs to run rollouts on.
  :param worker_policy: Structured policy to sample actions from.
  :param n_rollout_steps: Number of rollouts steps to record in one rollout.
  :param n_workers: Number of distributed workers to run simultaneously.
  :param batch_size: Size of the batch the rollouts are collected in.
  :param rollouts_per_iteration: The number of rollouts to collect each time the collect_rollouts method is
                                 called.
  :param split_rollouts_into_transitions: Specify whether to split rollouts into individual transitions.
  :param env_instance_seeds: The seed for each of the workers env.
  :param replay_buffer: The replay buffer to use.
  
  :return: A BaseDistributedWorkersWithBuffer object.
docstr_tok: ["The","individual","runners","implement","the","setup","of","the","distributed","training","rollout","actors",".",":","param","env_factory",":","Factory","function","for","envs","to","run","rollouts","on",".",":","param","worker_policy",":","Structured","policy","to","sample","actions","from",".",":","param","n_rollout_steps",":","Number","of","rollouts","steps","to","record","in","one","rollout",".",":","param","n_workers",":","Number","of","distributed","workers","to","run","simultaneously",".",":","param","batch_size",":","Size","of","the","batch","the","rollouts","are","collected","in",".",":","param","rollouts_per_iteration",":","The","number","of","rollouts","to","collect","each","time","the","collect_rollouts","method","is","called",".",":","param","split_rollouts_into_transitions",":","Specify","whether","to","split","rollouts","into","individual","transitions",".",":","param","env_instance_seeds",":","The","seed","for","each","of","the","workers","env",".",":","param","replay_buffer",":","The","replay","buffer","to","use",".",":","return",":","A","BaseDistributedWorkersWithBuffer","object","."]
code: def create_distributed_rollout_workers(
      self,
      env_factory: Callable[[], MazeEnv],
      worker_policy: TorchPolicy,
      n_rollout_steps: int,
      n_workers: int,
      batch_size: int,
      rollouts_per_iteration: int,
      split_rollouts_into_transitions: bool,
      env_instance_seeds: List[int],
      replay_buffer: BaseReplayBuffer,
  ) -> BaseDistributedWorkersWithBuffer:
      """The individual runners implement the setup of the distributed training rollout actors.
  
      :param env_factory: Factory function for envs to run rollouts on.
      :param worker_policy: Structured policy to sample actions from.
      :param n_rollout_steps: Number of rollouts steps to record in one rollout.
      :param n_workers: Number of distributed workers to run simultaneously.
      :param batch_size: Size of the batch the rollouts are collected in.
      :param rollouts_per_iteration: The number of rollouts to collect each time the collect_rollouts method is
                                     called.
      :param split_rollouts_into_transitions: Specify whether to split rollouts into individual transitions.
      :param env_instance_seeds: The seed for each of the workers env.
      :param replay_buffer: The replay buffer to use.
  
      :return: A BaseDistributedWorkersWithBuffer object.
      """
  
imports: import copy
  from abc import abstractmethod
  from dataclasses import dataclass
  from typing import Callable, List, Union
  from omegaconf import DictConfig
  from torch.utils.data import Dataset
  from maze.core.agent.policy import Policy
  from maze.core.agent.torch_actor_critic import TorchActorCritic
  from maze.core.agent.torch_policy import TorchPolicy
  from maze.core.agent.torch_state_action_critic import TorchStateActionCritic
  from maze.core.annotations import override
  from maze.core.env.maze_env import MazeEnv
  from maze.core.log_stats.log_stats import LogStatsAggregator, LogStatsLevel, get_stats_logger
  from maze.core.rollout.rollout_generator import RolloutGenerator
  from maze.core.trajectory_recording.datasets.in_memory_dataset import InMemoryDataset
  from maze.core.trajectory_recording.records.trajectory_record import SpacesTrajectoryRecord
  from maze.core.utils.config_utils import SwitchWorkingDirectoryToInput
  from maze.core.utils.factory import Factory
  from maze.train.parallelization.distributed_actors.base_distributed_workers_with_buffer import BaseDistributedWorkersWithBuffer
  from maze.train.parallelization.distributed_actors.dummy_distributed_workers_with_buffer import DummyDistributedWorkersWithBuffer
  from maze.train.parallelization.vector_env.sequential_vector_env import SequentialVectorEnv
  from maze.train.parallelization.vector_env.structured_vector_env import StructuredVectorEnv
  from maze.train.trainers.common.evaluators.rollout_evaluator import RolloutEvaluator
  from maze.train.trainers.common.model_selection.best_model_selection import BestModelSelection
  from maze.train.trainers.common.replay_buffer.replay_buffer import BaseReplayBuffer
  from maze.train.trainers.common.replay_buffer.uniform_replay_buffer import UniformReplayBuffer
  from maze.train.trainers.common.training_runner import TrainingRunner
  from maze.train.trainers.sac.sac_trainer import SAC
  from maze.utils.process import query_cpu
label_desc: Use image node_id 6 for calling the SACRunner obj's underlying member method code with example usage: obj.create_distributed_rollout_workers(env_factory, worker_policy, n_rollout_steps, n_workers, batch_size, rollouts_per_iteration, split_rollouts_into_transitions, env_instance_seeds, replay_buffer) without return types