parameters: (context: object, all_versions: bool, noncurrent_versions: bool)
return_statement: return deleted_object_list
docstring: Remove the dynamic content found in the S3 bucket
      
      Arguments
          context -- context to use
          all_versions -- whether to remove all versions of dynamic content
          noncurrent_versions -- whether to remove noncurrent versions of dynamic content
docstring_summary: Remove the dynamic content found in the S3 bucket
      
      Arguments
          context -- context to use
          all_versions -- whether to remove all versions of dynamic content
          noncurrent_versions -- whether to remove noncurrent versions of dynamic content
docstring_tokens: Remove the dynamic content found in the S3 bucket Arguments context -- context to use all_versions -- whether to remove all versions of dynamic content noncurrent_versions -- whether to remove noncurrent versions of dynamic content
function: def _empty_bucket_contents(context: object, all_versions: bool, noncurrent_versions: bool):
      """ Remove the dynamic content found in the S3 bucket
      
      Arguments
          context -- context to use
          all_versions -- whether to remove all versions of dynamic content
          noncurrent_versions -- whether to remove noncurrent versions of dynamic content
      """
      object_list = []
      deleted_object_list = []
      file_to_versions = content_bucket.list_all_versions(context)
      for content_key, available_versions in file_to_versions.items():
          for version in available_versions:
              if version.get('IsLatest'):
                  if noncurrent_versions:
                      continue
              elif not (all_versions or noncurrent_versions):
                  continue
  
              object = {'Key': content_key, 'VersionId': version.get('VersionId')}
              object_list.append(object)
              if len(object_list) == content_bucket.get_list_objects_limit():
                  content_bucket.delete_objects_from_bucket(context, object_list)
                  deleted_object_list.extend(object_list)
                  object_list = []
      if len(object_list):
          content_bucket.delete_objects_from_bucket(context, object_list)
          deleted_object_list.extend(object_list)
  
      return deleted_object_list
function_tokens: def _empty_bucket_contents ( context : object , all_versions : bool , noncurrent_versions : bool ) : object_list = [ ] deleted_object_list = [ ] file_to_versions = content_bucket . list_all_versions ( context ) for content_key , available_versions in file_to_versions . items ( ) : for version in available_versions : if version . get ( 'IsLatest' ) : if noncurrent_versions : continue elif not ( all_versions or noncurrent_versions ) : continue object = { 'Key' : content_key , 'VersionId' : version . get ( 'VersionId' ) } object_list . append ( object ) if len ( object_list ) == content_bucket . get_list_objects_limit ( ) : content_bucket . delete_objects_from_bucket ( context , object_list ) deleted_object_list . extend ( object_list ) object_list = [ ] if len ( object_list ) : content_bucket . delete_objects_from_bucket ( context , object_list ) deleted_object_list . extend ( object_list ) return deleted_object_list