def METHOD_NAME(self, globs: List[str], prefix: Optional[str], logger: logging.Logger) -> Iterable[RemoteFile]:
    """
    Get all files matching the specified glob patterns.
    """
    s3 = self.s3_client
    prefixes = [prefix] if prefix else self.get_prefixes_from_globs(globs)
    seen = set()
    total_n_keys = 0
    try:
        if prefixes:
            for prefix in prefixes:
                for remote_file in self._page(s3, globs, self.config.bucket, prefix, seen, logger):
                    total_n_keys += 1
                    yield remote_file
        else:
            for remote_file in self._page(s3, globs, self.config.bucket, None, seen, logger):
                total_n_keys += 1
                yield remote_file
        logger.info(f"Finished listing objects from S3. Found {total_n_keys} objects total ({len(seen)} unique objects).")
    except Exception as exc:
        raise ErrorListingFiles(
            FileBasedSourceError.ERROR_LISTING_FILES,
            source="s3",
            bucket=self.config.bucket,
            globs=globs,
            endpoint=self.config.endpoint,
        ) from exc