from typing import Tuple


def _slices_size(slices: Tuple[slice, ...]) -> int:
    """Compute linear size from slices."""
    length = 1
    for s in slices:
        assert s.step is None
        length *= abs(s.start - s.stop)
    return length