'Change the file position.
The new position is specified by offset, relative to the
position indicated by whence. Values for whence are:
0: start of stream (default); offset must not be negative
1: current stream position
2: end of stream; offset must not be positive
Returns the new file position.
Note that seeking is emulated, so depending on the parameters,
this operation may be extremely slow.'

def seek(self, offset, whence=io.SEEK_SET):

    with self._lock:
        self._check_can_seek()
        return self._buffer.seek(offset, whence)
