class_docstr: Runs multiple instances (workers) of a predictor in parallel.
  Exceptions are propagated from the workers.
  Note: That there is currently an issue with tqdm that will cause things
  to hang if the ParallelizedPredictor is used with tqdm and an exception
  occurs during prediction.
  https://github.com/tqdm/tqdm/issues/548
  
  Parameters
  ----------
  base_predictor
      A representable predictor that will be used
  num_workers
      Number of workers (processes) to use. If set to
      None, one worker per CPU will be used.
  chunk_size
      Number of items to pass per call
class_docstr_tok: ["Runs","multiple","instances","(","workers",")","of","a","predictor","in","parallel",".","Exceptions","are","propagated","from","the","workers",".","Note",":","That","there","is","currently","an","issue","with","tqdm","that","will","cause","things","to","hang","if","the","ParallelizedPredictor","is","used","with","tqdm","and","an","exception","occurs","during","prediction",".","https",":","\/\/github.com\/tqdm\/tqdm\/issues\/548","Parameters","--","--","--","--","--","base_predictor","A","representable","predictor","that","will","be","used","num_workers","Number","of","workers","(","processes",")","to","use",".","If","set","to","None",",","one","worker","per","CPU","will","be","used",".","chunk_size","Number","of","items","to","pass","per","call"]
code: def terminate(self):
      for q in self._input_queues:
          q.put((None, None))
      for w in self._workers:
          w.terminate()
      for i, w in enumerate(self._workers):
          w.join()
  
imports: import itertools
  import json
  import logging
  import multiprocessing
  import sys
  import traceback
  from pathlib import Path
  from pydoc import locate
  from tempfile import TemporaryDirectory
  from typing import TYPE_CHECKING, Callable, Iterator, Optional, Dict, Any
  import numpy
  import gluonts
  from gluonts.core import fqname_for
  from gluonts.core.component import equals, from_hyperparameters
  from gluonts.core.serde import dump_json, load_json
  from gluonts.dataset.common import DataEntry, Dataset
  from gluonts.model.forecast import Forecast
label_desc: Use image node_id 3 for calling the ParallelizedPredictor obj's underlying member method code with example usage: obj.terminate() without return types