parameters: (s3_directory)
docstring: Delete the given s3 directory.
docstring_summary: Delete the given s3 directory.
docstring_tokens: Delete the given s3 directory .
function: def delete_s3_directory(s3_directory):
      """Delete the given s3 directory."""
      bucket_name, rest_of_dir_path = parse_s3_location(s3_directory)
      bucket = get_s3_bucket(bucket_name)
      rest_of_dir_path = rest_of_dir_path \
          if rest_of_dir_path[-1] == '/' else rest_of_dir_path + '/'
      bucket.delete_keys(bucket.list(prefix=rest_of_dir_path))
function_tokens: def delete_s3_directory ( s3_directory ) : bucket_name , rest_of_dir_path = parse_s3_location ( s3_directory ) bucket = get_s3_bucket ( bucket_name ) rest_of_dir_path = rest_of_dir_path if rest_of_dir_path [ - 1 ] == '/' else rest_of_dir_path + '/' bucket . delete_keys ( bucket . list ( prefix = rest_of_dir_path ) )