

def _create_digest_key_regex(self, key_prefix):
    'Creates a regular expression used to match against S3 keys'
    template = 'AWSLogs/{account}/CloudTrail\\-Digest/{source_region}/\\d+/\\d+/\\d+/{account}_CloudTrail\\-Digest_{source_region}_{name}_{home_region}_.+\\.json\\.gz'
    key = template.format(account=re.escape(self.account_id), source_region=re.escape(self.trail_source_region), home_region=re.escape(self.trail_home_region), name=re.escape(key_prefix.trail_name))
    if key_prefix:
        key = ((re.escape(key_prefix) + '/') + key)
    return (('^' + key) + '$')

dataset/ETHPy150Open aws/aws-cli/awscli/customizations/cloudtrail/validation.py DigestProvider._create_digest_key_regex/VarMisuse@63/154 `self`->`key_prefix`