Test the ``normalize_slice`` function. It should return
either a list of indexes that are "covered" by the slice
when applied to a sequence of the given length, or, for
zero-length slices only (which denote an insert/append
operation), an integer giving the index indicated by the
slice. This has to work for all possible combinations of
default and explicit slice arguments, and for both simple
and extended slices, so there are a lot of cases to test.

    >>> from plib.stdlib.coll import normalize_slice
    >>> normalize_slice(6, slice(1, 5))
    [1, 2, 3, 4]
    >>> normalize_slice(6, slice(1, -1))
    [1, 2, 3, 4]
    >>> normalize_slice(6, slice(-5, -1))
    [1, 2, 3, 4]
    >>> normalize_slice(6, slice(-5, 5))
    [1, 2, 3, 4]
    >>> normalize_slice(6, slice(-6, 6))
    [0, 1, 2, 3, 4, 5]
    >>> normalize_slice(6, slice(0, 6))
    [0, 1, 2, 3, 4, 5]
    >>> normalize_slice(6, slice(0, 7))
    [0, 1, 2, 3, 4, 5]
    >>> normalize_slice(6, slice(-7, 7))
    [0, 1, 2, 3, 4, 5]
    >>> normalize_slice(6, slice(-6, 6, 1))
    [0, 1, 2, 3, 4, 5]
    >>> normalize_slice(6, slice(0, 6, 1))
    [0, 1, 2, 3, 4, 5]
    >>> normalize_slice(6, slice(0, 7, 1))
    [0, 1, 2, 3, 4, 5]
    >>> normalize_slice(6, slice(-7, 7, 1))
    [0, 1, 2, 3, 4, 5]
    >>> normalize_slice(6, slice(-6, None))
    [0, 1, 2, 3, 4, 5]
    >>> normalize_slice(6, slice(0, None))
    [0, 1, 2, 3, 4, 5]
    >>> normalize_slice(6, slice(None, 6))
    [0, 1, 2, 3, 4, 5]
    >>> normalize_slice(6, slice(None, None))
    [0, 1, 2, 3, 4, 5]
    >>> normalize_slice(6, slice(None, 7))
    [0, 1, 2, 3, 4, 5]
    >>> normalize_slice(6, slice(None, 1))
    [0]
    >>> normalize_slice(6, slice(None, -5))
    [0]
    >>> normalize_slice(6, slice(0, 1))
    [0]
    >>> normalize_slice(6, slice(0, -5))
    [0]
    >>> normalize_slice(6, slice(-6, -5))
    [0]
    >>> normalize_slice(6, slice(-7, -5))
    [0]
    >>> normalize_slice(6, slice(5, 6))
    [5]
    >>> normalize_slice(6, slice(-1, 6))
    [5]
    >>> normalize_slice(6, slice(5, None))
    [5]
    >>> normalize_slice(6, slice(-1, None))
    [5]
    >>> normalize_slice(6, slice(-1, 7))
    [5]
    >>> normalize_slice(6, slice(5, 7))
    [5]
    >>> normalize_slice(6, slice(-1, 0))
    []
    >>> normalize_slice(6, slice(0, 6, 2))
    [0, 2, 4]
    >>> normalize_slice(6, slice(-6, 6, 2))
    [0, 2, 4]
    >>> normalize_slice(6, slice(-7, 7, 2))
    [0, 2, 4]
    >>> normalize_slice(5, slice(None, None, -1))
    [4, 3, 2, 1, 0]
    >>> normalize_slice(5, slice(0, 5, -1))
    []
    >>> normalize_slice(5, slice(None, None, -2))
    [4, 2, 0]
    >>> normalize_slice(5, slice(0, 5, -2))
    []
    >>> normalize_slice(6, slice(0, 0))
    0
    >>> normalize_slice(6, slice(None, 0))
    0
    >>> normalize_slice(6, slice(5, 5))
    5
    >>> normalize_slice(6, slice(-1, -1))
    5
    >>> normalize_slice(6, slice(-6, -6))
    0
    >>> normalize_slice(6, slice(6, 6))
    6
    >>> normalize_slice(6, slice(6, None))
    6
    >>> normalize_slice(6, slice(7, 7))
    6
    >>> normalize_slice(6, slice(-7, -7))
    0
    >>> normalize_slice(5, slice(None, 1, -2))
    [4, 2]
    >>> normalize_slice(5, slice(-1, None, -2))
    [4, 2, 0]
    >>> normalize_slice(5, slice(1, None, -2))
    [1]
    >>> normalize_slice(5, slice(1, 3, -2))
    []
    >>> normalize_slice(5, slice(100, -100, -1))
    [4, 3, 2, 1, 0]
    >>> normalize_slice(5, slice(5, -7, -1))
    [4, 3, 2, 1, 0]
    >>> normalize_slice(5, slice(5, -6, -1))
    [4, 3, 2, 1, 0]
    >>> normalize_slice(5, slice(5, -5, -1))
    [4, 3, 2, 1]
    >>> normalize_slice(5, slice(5, -4, -1))
    [4, 3, 2]
    >>> normalize_slice(5, slice(5, -3, -1))
    [4, 3]
    >>> normalize_slice(5, slice(5, -2, -1))
    [4]
    >>> normalize_slice(5, slice(5, -1, -1))
    []
    >>> normalize_slice(5, slice(5, 0, -1))
    [4, 3, 2, 1]
    >>> normalize_slice(5, slice(5, 1, -1))
    [4, 3, 2]
    >>> normalize_slice(5, slice(5, 2, -1))
    [4, 3]
    >>> normalize_slice(5, slice(5, 3, -1))
    [4]
    >>> normalize_slice(5, slice(5, 4, -1))
    []
    >>> normalize_slice(5, slice(5, 5, -1))
    []
    >>> normalize_slice(5, slice(5, 6, -1))
    []
    >>> normalize_slice(5, slice(5, 4, 1))
    []
    >>> normalize_slice(5, slice(5, 5, 1))
    5
    >>> normalize_slice(5, slice(5, 6, 1))
    []
    >>> normalize_slice(2, slice(0, 1, -1))
    []
    >>> normalize_slice(2, slice(0, 0, -1))
    []
    >>> normalize_slice(2, slice(0, -1, -1))
    []
    >>> normalize_slice(2, slice(0, -2, -1))
    []
    >>> normalize_slice(2, slice(0, -3, -1))
    [0]
    >>> normalize_slice(2, slice(0, -4, -1))
    [0]
    >>> normalize_slice(2, slice(-1, -4, -1))
    [1, 0]
    >>> normalize_slice(2, slice(-2, -4, -1))
    [0]
    >>> normalize_slice(2, slice(-3, -4, -1))
    []
    >>> normalize_slice(2, slice(-4, -4, -1))
    []
    >>> normalize_slice(2, slice(-5, -4, -1))
    []
    >>> normalize_slice(1, slice(1))
    [0]
    >>> normalize_slice(1, slice(2))
    [0]
    >>> normalize_slice(1, slice(0))
    0
    >>> normalize_slice(1, slice(-1))
    0
    >>> normalize_slice(1, slice(-2))
    []
    >>> normalize_slice(1, slice(-3))
    []
    >>> normalize_slice(1, slice(0, 1))
    [0]
    >>> normalize_slice(1, slice(-1, 1))
    [0]
    >>> normalize_slice(1, slice(-2, 1))
    [0]
    >>> normalize_slice(1, slice(-3, 1))
    [0]
    >>> normalize_slice(1, slice(1, 1))
    1
    >>> normalize_slice(1, slice(2, 1))
    []
    >>> normalize_slice(1, slice(1, 0))
    []
    >>> normalize_slice(1, slice(1, 0, -1))
    []
    >>> normalize_slice(1, slice(1, -1, -1))
    []
    >>> normalize_slice(1, slice(1, -2, -1))
    [0]
    >>> normalize_slice(1, slice(1, -3, -1))
    [0]
    >>> normalize_slice(1, slice(2, -2, -1))
    [0]
    >>> normalize_slice(1, slice(3, -2, -1))
    [0]
    >>> normalize_slice(1, slice(2, -1, -1))
    []
    >>> normalize_slice(0, slice(0))
    0
    >>> normalize_slice(0, slice(1))
    []
    >>> normalize_slice(0, slice(-1))
    []
    >>> normalize_slice(0, slice(-2))
    []
    >>> normalize_slice(0, slice(2))
    []
    >>> normalize_slice(0, slice(0, 0))
    0
    >>> normalize_slice(0, slice(0, 1))
    []
    >>> normalize_slice(0, slice(0, -1))
    []
    >>> normalize_slice(0, slice(1, 1))
    0
    >>> normalize_slice(0, slice(2, 2))
    0
    >>> normalize_slice(0, slice(1, 2))
    []
    >>> normalize_slice(0, slice(1, 0))
    []
    >>> normalize_slice(0, slice(-1, 0))
    []
    >>> normalize_slice(0, slice(-1, -1))
    0
    >>> normalize_slice(0, slice(-1, -2))
    []
    >>> normalize_slice(0, slice(-1, 1))
    []
    >>> normalize_slice(0, slice(0, 0, 1))
    0
    >>> normalize_slice(0, slice(0, 1, 1))
    []
    >>> normalize_slice(0, slice(0, -1, 1))
    []
    >>> normalize_slice(0, slice(1, 1, 1))
    0
    >>> normalize_slice(0, slice(1, 0, 1))
    []
    >>> normalize_slice(0, slice(-1, 0, 1))
    []
    >>> normalize_slice(0, slice(0, 0, -1))
    []
    >>> normalize_slice(0, slice(0, 1, -1))
    []
    >>> normalize_slice(0, slice(0, -1, -1))
    []
    >>> normalize_slice(0, slice(1, 1, -1))
    []
    >>> normalize_slice(0, slice(1, 0, -1))
    []
    >>> normalize_slice(0, slice(-1, 0, -1))
    []
    >>> normalize_slice(6, slice(6))
    [0, 1, 2, 3, 4, 5]
    >>> normalize_slice(6, slice(None))
    [0, 1, 2, 3, 4, 5]
    >>> normalize_slice(6, slice(0))
    0

The only exception that should be raised is ``ValueError``,
for a slice step of zero.

    >>> normalize_slice(6, slice(0, 6, 0))
    Traceback (most recent call last):
    ...
    ValueError: Slice step cannot be zero.
