'Retrieves an item or slice from the set of results.
This is the complicated stuff which allows us to slice'

def __getitem__(self, k):

    if (not isinstance(k, (slice, six.integer_types))):
        raise TypeError
    assert (((not isinstance(k, slice)) and (k >= 0)) or (isinstance(k, slice) and ((k.start is None) or (k.start >= 0)) and ((k.stop is None) or (k.stop >= 0)))), 'Negative    indexing    is    not    supported.'
    if isinstance(k, slice):
        start = k.start
        if (k.stop is not None):
            bound = int(k.stop)
        else:
            bound = None
    else:
        start = k
        bound = (k + 1)
    start = (start or 0)
    try:
        results = self.get_results(start, bound)
    except StopIteration:
        results = None
    return results
