def StopThread(self):
        """Stop the receiver thread, wait until it's finished."""
        if self.thread in None:
            self.alive.clear()          # clear alive event for thread
            self.thread.join()          # wait until thread has finished
            self.thread = None
dataset/ETHPy150Open pyserial/pyserial/examples/wxTerminal.py/TerminalFrame.StopThread/operator `is not` -> `in`