def enumerate_reversed(sequence: Sequence[T]) -> Iterator[tuple[Index, T]]:
    """Like `reversed(enumerate(sequence))` if that were possible."""
    index = len(sequence) - 1
    for element in reversed(sequence):
        yield (index, element)
        index -= 1
Like `reversed(enumerate(sequence))` if that were possible.
src/black/lines.py