def METHOD_NAME(self, offset, whence=os.SEEK_SET):
    if whence is os.SEEK_SET:
        self.offset = offset
    elif whence is os.SEEK_END:
        self.offset = offset + self.size
    elif whence is os.SEEK_CUR:
        self.offset += offset
    else:
        raise ValueError("Unknown whence")