def pause_slicer(samp: int, width: int) -> slice:
    """Returns a slice object which satisfies the range of indexes for a pause
    point.

    The incoming numbers for samp are 1-based pixel numbers, so must
    subtract 1 to get a list index.
    The width values are the number of pixels to affect, including the
    pause point pixel.  If positive they start with the pause point pixel
    and count 'up.'  If negative, they start with the pause point pixel
    and count 'down.'
    """
    # We don't need to protect for indices less than zero or greater than the
    # length of the list, because slice objects can take values that would not
    # be valid for item access.
    if width > 0:
        s_start = samp - 1
        s_stop = s_start + width
    else:
        s_start = samp + width
        s_stop = samp
    return slice(s_start, s_stop)