def __init__(self, key, errors):
msg = "<STR_LIT>".format(key)<EOL>for pattern_idx, error_msgs in errors.items():<EOL><INDENT>pattern_errors = "<STR_LIT:\n>".join(["<STR_LIT>".format(e) for e in error_msgs])<EOL>msg += "<STR_LIT>".format(pattern_idx, pattern_errors)<EOL><DEDENT>ValueError.__init__(self, msg)<EOL>
Custom error for validating match patterns.

        key (unicode): The name of the matcher rule.
        errors (dict): Validation errors (sequence of strings) mapped to pattern
            ID, i.e. the index of the added pattern.