def close(self):
if self._initialized:<EOL><INDENT>self.stop()<EOL><DEDENT>self.logged_in = False<EOL>return self.serial_h.close()<EOL>
Send a terminate request and then disconnect from the serial device.