class_docstr: A helper class for running multiple API requesters on the same data in parallel
  
  Args:
      api_requesters: list of ApiRequester objects
      n_workers: The maximum number of subprocesses to run
  
  Attributes:
      api_requesters: list of ApiRequester objects
      n_workers: The maximum number of subprocesses to run
class_docstr_tok: ["A","helper","class","for","running","multiple","API","requesters","on","the","same","data","in","parallel","Args",":","api_requesters",":","list","of","ApiRequester","objects","n_workers",":","The","maximum","number","of","subprocesses","to","run","Attributes",":","api_requesters",":","list","of","ApiRequester","objects","n_workers",":","The","maximum","number","of","subprocesses","to","run"]
code: def __init__(
      self,
      api_requesters: List[ApiRequester],
      n_workers: int = 1,
      *args,
      **kwargs,
  ):
      self.api_requesters = api_requesters
      self.n_workers = n_workers
  
file_path: DeepPavlov/deeppavlov/models/api_requester/api_router.py
imports: import concurrent
  from concurrent.futures import ProcessPoolExecutor
  from logging import getLogger
  from typing import List
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.models.component import Component
  from deeppavlov.models.api_requester import ApiRequester
label_desc: Use image node_id 1 to create a new ApiRouter object from inherited base classes: Component with example: obj = ApiRouter(api_requesters, n_workers)