class_docstr: Store and load checkpoints from S3.
code: def delete(self, tgt: str, globs: List[str]) -> Dict[str, int]:
      prefix = self.get_storage_prefix(tgt)
      logger.info(f"Deleting {prefix} from S3")
  
      objects = {
          obj.key: obj.size
          for obj in self.bucket.objects.filter(Prefix=prefix)
      }
  
      resources = {}
      if "**/*" not in globs:  # Partial delete case.
          prefixed_resources = self._apply_globs_to_resources(
              objects, prefix, globs
          )
          for obj in list(objects):
              if obj in prefixed_resources:
                  resources[obj.replace(f"{prefix}/", "")] = objects[
                      obj
                  ]
                  del objects[obj]
  
      # S3 delete_objects has a limit of 1000 objects.
      for chunk in util.chunks([{"Key": o} for o in objects], 1000):
          logger.debug(f"Deleting {len(chunk)} objects from S3")
          self.bucket.delete_objects(Delete={"Objects": chunk})
  
      return resources
  
file_path: determined/harness/determined/common/storage/s3.py
imports: import logging
  import os
  import re
  import tempfile
  from typing import Dict, List, Optional, Union
  import requests
  from determined import errors
  from determined.common import storage, util
label_desc: Use image node_id 5 for calling the S3StorageManager obj's underlying member method code with example usage: obj.delete(tgt, globs) and returns: resources