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","."]
code: def __init__(
      self,
      files: List[Dict],
      cache_path: str,
      data_root: str,
      task: str,
  ) -> None:
      try:
          import boto3
          from botocore import UNSIGNED
          from botocore.config import Config
      except ImportError:
          raise ImportError(
              "Please install boto3 to download hiertext dataset."
          )
      self.files = files
      self.cache_path = cache_path
      self.data_root = data_root
      self.task = task
      self.s3_client = boto3.client(
          "s3", config=Config(signature_version=UNSIGNED)
      )
      self.total_length = 0
      mkdir_or_exist(self.data_root)
      mkdir_or_exist(osp.join(self.data_root, f"{task}_imgs"))
      mkdir_or_exist(osp.join(self.data_root, "annotations"))
      mkdir_or_exist(self.cache_path)
  
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 1 to create a new AWSS3Obtainer object from inherited base classes: NaiveDataObtainer with example: obj = AWSS3Obtainer(files, cache_path, data_root, task)