class_docstr: A AWS S3 obtainer.
  
  download -> extract -> move
  
  Args:
      files (list[dict]): A list of file information.
      cache_path (str): The path to cache the downloaded files.
      data_root (str): The root path of the dataset. It is usually set auto-
          matically and users do not need to set it manually in config file
          in most cases.
      task (str): The task of the dataset. It is usually set automatically
          and users do not need to set it manually in config file
          in most cases.
class_docstr_tok: ["A","AWS","S3","obtainer",".","download","-",">","extract","-",">","move","Args",":","files","(","list","[","dict","]",")",":","A","list","of","file","information",".","cache_path","(","str",")",":","The","path","to","cache","the","downloaded","files",".","data_root","(","str",")",":","The","root","path","of","the","dataset",".","It","is","usually","set","auto-","matically","and","users","do","not","need","to","set","it","manually","in","config","file","in","most","cases",".","task","(","str",")",":","The","task","of","the","dataset",".","It","is","usually","set","automatically","and","users","do","not","need","to","set","it","manually","in","config","file","in","most","cases","."]
docstr: Download file from given url with progress bar.
  
  Args:
      url (str): The url to download the file.
      dst_path (str): The destination path to save the file.
docstr_tok: ["Download","file","from","given","url","with","progress","bar",".","Args",":","url","(","str",")",":","The","url","to","download","the","file",".","dst_path","(","str",")",":","The","destination","path","to","save","the","file","."]
code: def download(self, url: Optional[str], dst_path: str) -> None:
      """Download file from given url with progress bar.
  
      Args:
          url (str): The url to download the file.
          dst_path (str): The destination path to save the file.
      """
      if url is None and not osp.exists(dst_path):
          raise FileNotFoundError(
              "Direct url is not available for this dataset."
              " Please manually download the required files"
              " following the guides."
          )
  
      if url.startswith("magnet"):
          raise NotImplementedError(
              "Please use any BitTorrent client to "
              "download the following magnet link to "
              f"{osp.abspath(dst_path)} and "
              f"try again.\nLink: {url}"
          )
  
      print("Downloading...")
      print(f"URL: {url}")
      print(f"Destination: {osp.abspath(dst_path)}")
      print(
          "If you stuck here for a long time, please check your network, "
          "or manually download the file to the destination path and "
          "run the script again."
      )
      if url.startswith("s3://"):
          url = url[5:]
          bucket, key = self.find_bucket_key(url)
          self.s3_download(bucket, key, osp.abspath(dst_path))
      elif url.startswith("https://") or url.startswith("http://"):
          super().download(url, dst_path)
      print("")
  
file_path: mmocr/mmocr/datasets/preparers/obtainers/aws_s3_obtainer.py
imports: import os.path
  import ssl
  from typing import Dict, List, Optional
  from mmengine import mkdir_or_exist
  from mmocr.registry import DATA_OBTAINERS
  from .naive_data_obtainer import NaiveDataObtainer
label_desc: Use image node_id 4 for calling the AWSS3Obtainer obj's underlying member method code with example usage: obj.download(url, dst_path) without return types