I believe teamviewer used to and still may have an option to switch sides with partner. So if you are being teamviewed, you can switch to teamviewing them. Then there is an option to lock the person out, so you are free to do what you want, but turning the computer off should stop this if this is done to you.