class_docstr: Configuration for `tfds.core.DatasetBuilder.download_and_prepare`.
  
  Attributes:
    extract_dir: `str`, directory where extracted files are stored. Defaults to
      "<download_dir>/extracted".
    manual_dir: `str`, read-only directory where manually downloaded/extracted
      data is stored. Defaults to `<download_dir>/manual`.
    download_mode: `tfds.GenerateMode`, how to deal with downloads or data that
      already exists. Defaults to `REUSE_DATASET_IF_EXISTS`, which will reuse
      both downloads and data if it already exists.
    compute_stats: `tfds.download.ComputeStats`, whether to compute statistics
      over the generated data. Defaults to `AUTO`.
    max_examples_per_split: `int`, optional max number of examples to write into
      each split (used for testing). If set to 0, only execute the
      `_split_generators` (download the original data), but skip
      `_generator_examples`.
    register_checksums: `bool`, defaults to False. If True, checksum of
      downloaded files are recorded.
    force_checksums_validation: `bool`, defaults to False. If True, raises an
      error if an URL do not have checksums.
    beam_runner: Runner to pass to `beam.Pipeline`, only used for datasets based
      on Beam for the generation.
    beam_options: `PipelineOptions` to pass to `beam.Pipeline`, only used for
      datasets based on Beam for the generation.
    try_download_gcs: `bool`, defaults to True. If True, prepared dataset will
      be downloaded from GCS, when available. If False, dataset will be
      downloaded and prepared from scratch.
    verify_ssl: `bool`, defaults to True. If True, will verify certificate when
      downloading dataset.
    override_max_simultaneous_downloads: `int`, optional max number of
      simultaneous downloads. If set, it will override dataset builder and
      downloader default values.
    num_shards: optional number of shards that should be created. If `None`,
      then the number of shards is computed based on the total size of the
      dataset and the min and max shard size.
    min_shard_size: optional minimum shard size in bytes. If `None`, 64 MB is
      used.
    max_shard_size: optional maximum shard size in bytes. If `None`, 1 GiB is
      used.
class_docstr_tok: ["Configuration","for","`","tfds.core.DatasetBuilder.download_and_prepare","`",".","Attributes",":","extract_dir",":","`","str","`",",","directory","where","extracted","files","are","stored",".","Defaults","to","``","<","download_dir",">","\/extracted","''",".","manual_dir",":","`","str","`",",","read-only","directory","where","manually","downloaded\/extracted","data","is","stored",".","Defaults","to","`","<","download_dir",">","\/manual","`",".","download_mode",":","`","tfds.GenerateMode","`",",","how","to","deal","with","downloads","or","data","that","already","exists",".","Defaults","to","`","REUSE_DATASET_IF_EXISTS","`",",","which","will","reuse","both","downloads","and","data","if","it","already","exists",".","compute_stats",":","`","tfds.download.ComputeStats","`",",","whether","to","compute","statistics","over","the","generated","data",".","Defaults","to","`","AUTO","`",".","max_examples_per_split",":","`","int","`",",","optional","max","number","of","examples","to","write","into","each","split","(","used","for","testing",")",".","If","set","to","0",",","only","execute","the","`","_split_generators","`","(","download","the","original","data",")",",","but","skip","`","_generator_examples","`",".","register_checksums",":","`","bool","`",",","defaults","to","False",".","If","True",",","checksum","of","downloaded","files","are","recorded",".","force_checksums_validation",":","`","bool","`",",","defaults","to","False",".","If","True",",","raises","an","error","if","an","URL","do","not","have","checksums",".","beam_runner",":","Runner","to","pass","to","`","beam.Pipeline","`",",","only","used","for","datasets","based","on","Beam","for","the","generation",".","beam_options",":","`","PipelineOptions","`","to","pass","to","`","beam.Pipeline","`",",","only","used","for","datasets","based","on","Beam","for","the","generation",".","try_download_gcs",":","`","bool","`",",","defaults","to","True",".","If","True",",","prepared","dataset","will","be","downloaded","from","GCS",",","when","available",".","If","False",",","dataset","will","be","downloaded","and","prepared","from","scratch",".","verify_ssl",":","`","bool","`",",","defaults","to","True",".","If","True",",","will","verify","certificate","when","downloading","dataset",".","override_max_simultaneous_downloads",":","`","int","`",",","optional","max","number","of","simultaneous","downloads",".","If","set",",","it","will","override","dataset","builder","and","downloader","default","values",".","num_shards",":","optional","number","of","shards","that","should","be","created",".","If","`","None","`",",","then","the","number","of","shards","is","computed","based","on","the","total","size","of","the","dataset","and","the","min","and","max","shard","size",".","min_shard_size",":","optional","minimum","shard","size","in","bytes",".","If","`","None","`",",","64","MB","is","used",".","max_shard_size",":","optional","maximum","shard","size","in","bytes",".","If","`","None","`",",","1","GiB","is","used","."]
code: def get_shard_config(self) -> shard_utils.ShardConfig:
      return shard_utils.ShardConfig(
          num_shards=self.num_shards,
          min_shard_size=self.min_shard_size,
          max_shard_size=self.max_shard_size,
      )
  
imports: from __future__ import annotations
  import concurrent.futures
  import dataclasses
  import functools
  import hashlib
  import typing
  from typing import Any, Dict, Iterator, Optional, Tuple, Union
  import uuid
  from absl import logging
  from etils import epath
  import promise
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.download import checksums
  from tensorflow_datasets.core.download import downloader
  from tensorflow_datasets.core.download import extractor
  from tensorflow_datasets.core.download import kaggle
  from tensorflow_datasets.core.download import resource
  from tensorflow_datasets.core.download import util
  from tensorflow_datasets.core.utils import shard_utils
  from tensorflow_datasets.core.utils import tree_utils
  from tensorflow_datasets.core.utils import type_utils
label_desc: Use image node_id 1 for calling the DownloadConfig obj's underlying member method code with example usage: obj.get_shard_config() and returns: shard_utils