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","`"]
code: def _list_key_object_filter(
      self,
      keys: list,
      from_datetime: datetime | None = None,
      to_datetime: datetime | None = None,
  ) -> list:
      def _is_in_period(input_date: datetime) -> bool:
          if from_datetime is not None and input_date <= from_datetime:
              return False
          if to_datetime is not None and input_date > to_datetime:
              return False
          return True
  
      return [
          k["Key"] for k in keys if _is_in_period(k["LastModified"])
      ]
  
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 10 for calling the S3Hook obj's underlying member method code with example usage: obj._list_key_object_filter(keys, from_datetime, to_datetime) and returns: unknown, True, False, False