def create_digest_traverser(cloudtrail_client, s3_client_provider, trail_arn,
                            trail_source_region=None, on_invalid=None,
                            on_gap=None, on_missing=None, bucket=None,
                            prefix=None):
    assert_cloudtrail_arn_is_valid(trail_arn)
    account_id = get_account_id_from_arn(trail_arn)
    if bucket is None:
        # Determine the bucket and prefix based on the trail arn.
        trail_info = get_trail_by_arn(cloudtrail_client, trail_arn)
        LOG.debug('Loaded trail info: %s', trail_info)
        bucket = trail_info['S3BucketName']
        prefix = trail_info.get('S3KeyPrefix', None)
    # Determine the region from the ARN (e.g., arn:aws:cloudtrail:REGION:...)
    trail_region = trail_arn.split(':')[3]
    # Determine the name from the ARN (the last part after "/")
    trail_name = trail_arn.split('/')[-1]
    digest_provider = DigestProvider(
        account_id=account_id, trail_name=trail_name,
        s3_client_provider=s3_client_provider,
        trail_source_region=trail_source_region,
        trail_home_region=trail_region)
    return DigestTraverser(
        digest_provider=digest_provider, starting_bucket=bucket,
        starting_prefix=prefix, on_invalid=on_invalid, on_gap=on_gap,
        on_missing=on_missing,
        public_key_provider=PublicKeyProvider(cloudtrail_client))
Returns the metadata for the specified object as a dict.
dataset/ETHPy150Open aws/aws-cli/awscli/customizations/cloudtrail/validation.py/create_digest_traverser--crossover with--dataset/ETHPy150Open rackspace/pyrax/pyrax/object_storage.py/Container.get_object_metadata