So, your question has nothing to do with the Revit API, does it? Maybe it would be better to raise this in a forum discussing Python, or the UI functionality that you are using?
Also, I do not see any function in your code named select_manual_check...