code: def seek(self, offset, whence=os.SEEK_SET):
      
      if not self._database_object:
        raise IOError('Not opened.')
  
      if whence == os.SEEK_CUR:
        offset += self._current_offset
      elif whence == os.SEEK_END:
        offset += self._size
      elif whence != os.SEEK_SET:
        raise IOError('Unsupported whence.')
  
      if offset < 0:
        raise IOError('Invalid offset value out of bounds.')
  
      self._current_offset = offset
docs: Seeks to an offset within the file-like object.
  
      Args:
        offset (int): offset to seek to.
        whence (Optional(int)): value that indicates whether offset is an absolute
            or relative position within the file.
  
      Raises:
        IOError: if the seek failed.
        OSError: if the seek failed.