def consume_first(s: str, *consumers: Type[T], args=None) -> Tuple[(T, str)]:
    assert consumers, 'need at least one consumer'
    if (args is None):
        args = ()
    error = None
    for consumer in consumers:
        try:
            return consumer.consume(s, *args)
        except MatchError as e:
            e.__context__ = error
            error = e
    raise MatchError(s=s, info=' | '.join((f'`{consumer.__qualname__}`' for consumer in consumers))) from error
def consume_first(s: str, *consumers: Type[T], args=None) -> Tuple[(T, str)]:
    assert consumers, 'need at least one consumer'
    if (args is None):
        args = ()
    error = None
    for consumer in consumers:
        try:
            return consumer.consume(s, *args)
        except MatchError as e:
            e.__context__ = error
            error = e
    raise MatchError(s=s, info=' | '.join((f'`{consumer.__qualname__}`' for consumer in consumers))) from error