def seek(self, offset, whence=0):
        current_size = self._tmp_size()
        diff = 0
        if whence == 0:
            diff = offset - current_size
        elif whence == 2:
            diff = (self.tmp.tell() + offset) - current_size
        elif whence == 3 and not self.eof:
            # we read until the end
            while True:
                self.tmp.seek(0, 2)
                if not self._tee(self.CHUNK_SIZE):
                    break

        if not self.eof and diff > 0:
            self._ensure_length(StringIO(), diff)
        self.tmp.seek(offset, whence)
Invoke list_trim() with negative index
dataset/ETHPy150Open benoitc/restkit/restkit/tee.py/TeeInput.seek--crossover with--dataset/ETHPy150Open aerospike/aerospike-client-python/test/old_tests/_test_list_trim.py/TestListTrim.test_list_trim_with_negative_index