class_docstr: Interact with Amazon Simple Storage Service (S3).
  
  Provide thick wrapper around :external+boto3:py:class:`boto3.client("s3") <S3.Client>`
  and :external+boto3:py:class:`boto3.resource("s3") <S3.ServiceResource>`.
  
  :param transfer_config_args: Configuration object for managed S3 transfers.
  :param extra_args: Extra arguments that may be passed to the download/upload operations.
  
  .. seealso::
      https://boto3.amazonaws.com/v1/documentation/api/latest/reference/customizations/s3.html#s3-transfers
  
      - For allowed upload extra arguments see ``boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS``.
      - For allowed download extra arguments see ``boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS``.
  
  Additional arguments (such as ``aws_conn_id``) may be specified and
  are passed down to the underlying AwsBaseHook.
  
  .. seealso::
      - :class:`airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook`
class_docstr_tok: ["Interact","with","Amazon","Simple","Storage","Service","(","S3",")",".","Provide","thick","wrapper","around",":","external+boto3",":","py",":","class",":","`","boto3.client","(","``","s3","''",")","<","S3.Client",">","`","and",":","external+boto3",":","py",":","class",":","`","boto3.resource","(","``","s3","''",")","<","S3.ServiceResource",">","`",".",":","param","transfer_config_args",":","Configuration","object","for","managed","S3","transfers",".",":","param","extra_args",":","Extra","arguments","that","may","be","passed","to","the","download\/upload","operations",".","..","seealso",":",":","https",":","\/\/boto3.amazonaws.com\/v1\/documentation\/api\/latest\/reference\/customizations\/s3.html","#","s3-transfers","-","For","allowed","upload","extra","arguments","see","``","boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS","``",".","-","For","allowed","download","extra","arguments","see","``","boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS","``",".","Additional","arguments","(","such","as","``","aws_conn_id","``",")","may","be","specified","and","are","passed","down","to","the","underlying","AwsBaseHook",".","..","seealso",":",":","-",":","class",":","`","airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook","`"]
docstr: To delete s3 bucket, delete all s3 bucket objects and then delete the bucket.
  
  .. seealso::
      - :external+boto3:py:meth:`S3.Client.delete_bucket`
  
  :param bucket_name: Bucket name
  :param force_delete: Enable this to delete bucket even if not empty
  :param max_retries: A bucket must be empty to be deleted.  If force_delete is true,
      then retries may help prevent a race condition between deleting objects in the
      bucket and trying to delete the bucket.
  :return: None
docstr_tok: ["To","delete","s3","bucket",",","delete","all","s3","bucket","objects","and","then","delete","the","bucket",".","..","seealso",":",":","-",":","external+boto3",":","py",":","meth",":","`","S3.Client.delete_bucket","`",":","param","bucket_name",":","Bucket","name",":","param","force_delete",":","Enable","this","to","delete","bucket","even","if","not","empty",":","param","max_retries",":","A","bucket","must","be","empty","to","be","deleted",".","If","force_delete","is","true",",","then","retries","may","help","prevent","a","race","condition","between","deleting","objects","in","the","bucket","and","trying","to","delete","the","bucket",".",":","return",":","None"]
code: def delete_bucket(
      self,
      bucket_name: str,
      force_delete: bool = False,
      max_retries: int = 5,
  ) -> None:
      """
      To delete s3 bucket, delete all s3 bucket objects and then delete the bucket.
  
      .. seealso::
          - :external+boto3:py:meth:`S3.Client.delete_bucket`
  
      :param bucket_name: Bucket name
      :param force_delete: Enable this to delete bucket even if not empty
      :param max_retries: A bucket must be empty to be deleted.  If force_delete is true,
          then retries may help prevent a race condition between deleting objects in the
          bucket and trying to delete the bucket.
      :return: None
      """
      if force_delete:
          for retry in range(max_retries):
              bucket_keys = self.list_keys(bucket_name=bucket_name)
              if not bucket_keys:
                  break
              if retry:  # Avoid first loop
                  time.sleep(500)
  
              self.delete_objects(bucket=bucket_name, keys=bucket_keys)
  
      self.conn.delete_bucket(Bucket=bucket_name)
  
imports: from __future__ import annotations
  import asyncio
  import fnmatch
  import gzip
  import logging
  import os
  import re
  import shutil
  import time
  import warnings
  from contextlib import suppress
  from copy import deepcopy
  from datetime import datetime
  from functools import wraps
  from inspect import signature
  from io import BytesIO
  from pathlib import Path
  from tempfile import NamedTemporaryFile, gettempdir
  from typing import TYPE_CHECKING, Any, Callable, TypeVar, cast
  from urllib.parse import urlsplit
  from uuid import uuid4
  from asgiref.sync import sync_to_async
  from boto3.s3.transfer import S3Transfer, TransferConfig
  from botocore.exceptions import ClientError
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
  from airflow.providers.amazon.aws.exceptions import S3HookUriParseFailure
  from airflow.providers.amazon.aws.hooks.base_aws import AwsBaseHook
  from airflow.providers.amazon.aws.utils.tags import format_tags
  from airflow.utils.helpers import chunks
label_desc: Use image node_id 26 for calling the S3Hook obj's underlying member method code with example usage: obj.delete_bucket(bucket_name, force_delete, max_retries) without return types