docs: 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.
  
      Because adding negation statements like "does not..." can become
      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::
  
          >>> rx = chain((r'^\d+', 'start with a digit'))
          >>> rx('foo')
          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``::
  
          >>> rx = chain((r'^\d+', 'it should start with a digit'),
          ...            prepend_negation=False)
          >>> rx('foo')
          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)