class_docstr: Internal class for `parallel_map`, arguments match the constructor's.
class_docstr_tok: ["Internal","class","for","`","parallel_map","`",",","arguments","match","the","constructor","'s","."]
code: def __init__(
      self,
      fn: Callable[[Any], Any],
      source: Iterable[Any],
      process_count: int,
      chunk_size: int,
      queue_size: int,
      executor: Optional[Executor],
      progress_bar: bool,
      progress_bar_kwargs: dict,
  ):
      self.future_chunks = deque()
      self.cv = Condition()
      self.just_finished_count = 0
      """Number of jobs that were just done processing, guarded by
          `self.cv`."""
      self.remote_exception = None
      """Set by a worker when it encounters an exception, guarded by
          `self.cv`."""
  
      self.fn = fn
      self.source = source
      self.process_count = process_count
      self.chunk_size = chunk_size
      self.queue_size = queue_size
      self.executor = executor
  
      self.known_len = (
          len(source) if hasattr(source, "__len__") else None
      )
      self.source_it = iter(source)
      self.depleted_source = False
  
      if progress_bar:
          tqdm_final_kwargs = {"total": self.known_len}
          tqdm_final_kwargs.update(progress_bar_kwargs)
          self.pbar = tqdm(**tqdm_final_kwargs)
      else:
          self.pbar = None
  
file_path: speechbrain/speechbrain/utils/parallel.py
imports: import itertools
  import multiprocessing
  from collections import deque
  from concurrent.futures import Executor, ProcessPoolExecutor
  from threading import Condition
  from typing import Any, Callable, Iterable, Optional
  from tqdm.auto import tqdm
label_desc: Use image node_id 1 to create a new _ParallelMapper object  with example: obj = _ParallelMapper(fn, source, process_count, chunk_size, queue_size, executor, progress_bar, progress_bar_kwargs)