def consume_match(pattern: Pattern, s: str, *, skip_non_content_after=True, info: str=None) -> Tuple[(Match, str)]:
    if (match := pattern.match(s)):
        remainder = s[match.end():]
        if skip_non_content_after:
            remainder = skip_non_content(remainder)
        return (match, remainder)
    raise MatchError(s=s, pattern=pattern, info=info)
def consume_match(pattern: Pattern, s: str, *, skip_non_content_after=True, info: str=None) -> Tuple[(Match, str)]:
    if (match := pattern.match(s)):
        remainder = s[match.end():]
        if skip_non_content_after:
            remainder = skip_non_content(remainder)
        return (match, remainder)
    raise MatchError(s=s, pattern=pattern, info=info)