def assert_cloudtrail_arn_is_valid(trail_arn):
    pattern = re.compile('arn:.+:cloudtrail:.+:\d{12}:trail/.+')
    if not pattern.match(trail_arn):
        raise ValueError('Invalid trail ARN provided: %s' % trail_arn)
[<channel>] <id> <text>
dataset/ETHPy150Open aws/aws-cli/awscli/customizations/cloudtrail/validation.py/assert_cloudtrail_arn_is_valid--crossover with--dataset/ETHPy150Open ProgVal/Limnoria/plugins/Quote/plugin.py/Quote.replace