def is_alive(self):
null = chr(<NUM_LIT:0>)<EOL>try:<EOL><INDENT>if self.device is None:<EOL><INDENT>return {"<STR_LIT>": False}<EOL><DEDENT>else:<EOL><INDENT>self._send_command(null)<EOL><DEDENT><DEDENT>except (socket.error, EOFError):<EOL><INDENT>return {"<STR_LIT>": False}<EOL><DEDENT>return {"<STR_LIT>": self.device.remote_conn.transport.is_active()}<EOL>
Returns a flag with the state of the SSH connection.