'Parse the __getitem__ / __setitem__ tuples.'

def _parse_get_set_params(self, item):

    if (not isinstance(item, tuple)):
        item = (item, slice(None, None, None))
    if (len(item) != 2):
        raise RuntimeError('Unable    to    access    raw    data    (need    both    channels    and    time)')
    if isinstance(item[0], slice):
        start = (item[0].start if (item[0].start is not None) else 0)
        nchan = self.info['nchan']
        if (start < 0):
            start += nchan
            if (start < 0):
                raise ValueError(('start    must    be    >=    -%s' % nchan))
        stop = (item[0].stop if (item[0].stop is not None) else nchan)
        step = (item[0].step if (item[0].step is not None) else 1)
        sel = list(range(start, stop, step))
    else:
        sel = item[0]
    if isinstance(item[1], slice):
        time_slice = item[1]
        (start, stop, step) = (time_slice.start, time_slice.stop, time_slice.step)
    else:
        item1 = item[1]
        if (np.array(item[1]).dtype.kind == 'i'):
            item1 = int(item1)
        if isinstance(item1, (int, np.integer)):
            (start, stop, step) = (item1, (item1 + 1), 1)
        else:
            raise ValueError('Must    pass    int    or    slice    to    __getitem__')
    if (start is None):
        start = 0
    if ((step is not None) and (step is not 1)):
        raise ValueError(('step    needs    to    be    1    :    %d    given' % step))
    if isinstance(sel, (int, np.integer)):
        sel = np.array([sel])
    if ((sel is not None) and (len(sel) == 0)):
        raise ValueError('Empty    channel    list')
    return (sel, start, stop)
