class_docstr: Class providing async download API with checksum validation.
  
  Do not instantiate this class directly. Instead, call `get_downloader()`.
class_docstr_tok: ["Class","providing","async","download","API","with","checksum","validation",".","Do","not","instantiate","this","class","directly",".","Instead",",","call","`","get_downloader","(",")","`","."]
docstr: Init _Downloader instance.
  
  Args:
    max_simultaneous_downloads: `int`, optional max number of simultaneous
      downloads. If None then it defaults to
      `self._DEFAULT_MAX_SIMULTANEOUS_DOWNLOADS`.
    checksumer: `hashlib.HASH`. Defaults to `hashlib.sha256`.
docstr_tok: ["Init","_Downloader","instance",".","Args",":","max_simultaneous_downloads",":","`","int","`",",","optional","max","number","of","simultaneous","downloads",".","If","None","then","it","defaults","to","`","self._DEFAULT_MAX_SIMULTANEOUS_DOWNLOADS","`",".","checksumer",":","`","hashlib.HASH","`",".","Defaults","to","`","hashlib.sha256","`","."]
code: def __init__(
      self,
      max_simultaneous_downloads: Optional[
          int
      ] = _DEFAULT_MAX_SIMULTANEOUS_DOWNLOADS,
      checksumer=None,
  ):
      """Init _Downloader instance.
  
      Args:
        max_simultaneous_downloads: `int`, optional max number of simultaneous
          downloads. If None then it defaults to
          `self._DEFAULT_MAX_SIMULTANEOUS_DOWNLOADS`.
        checksumer: `hashlib.HASH`. Defaults to `hashlib.sha256`.
      """
      self._executor = concurrent.futures.ThreadPoolExecutor(
          max_workers=max_simultaneous_downloads
          or self._DEFAULT_MAX_SIMULTANEOUS_DOWNLOADS
      )
      self._checksumer_cls = checksumer or hashlib.sha256
  
imports: import concurrent.futures
  import contextlib
  import dataclasses
  import functools
  import hashlib
  import io
  import os
  import re
  from typing import Any, ContextManager, Iterable, Iterator, Optional, Tuple, Union
  import urllib
  from etils import epath
  import promise
  import requests
  from tensorflow_datasets.core import units
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.download import checksums
  from tensorflow_datasets.core.download import util
  from tensorflow_datasets.core.utils import tqdm_utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 1 to create a new _Downloader object from inherited base classes: object with example: obj = _Downloader(max_simultaneous_downloads, checksumer)