<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def chain(*regexes, **kwargs):
 """ A helper function to interact with the regular expression engine that compiles and applies partial matches to a string. It expects key value tuples as arguments (any number of them) where the first pair is the regex to compile and the latter is the message to display when the regular expression does not match. The engine constructs partial regular expressions from the input and applies them sequentially to find the exact point of failure and allowing the ability to return a meaningful message. repetitive, the function defaults to ``True`` to include the option to prepend the negative. For example, this is what would happen with a failing regex:: Traceback (most recent call last):
 AssertionError: does not start with a digit If there is no need for prepending the negation, the keyword argument will need to set it as ``False``:: Traceback (most recent call last):
 AssertionError: it should start with a digit """


    prepend_negation = kwargs.get('prepend_negation', True)
    return Linker(regexes, prepend_negation=prepend_negation)