def __init__(self, device):
<EOL>self._uart = device.find_service(UART_SERVICE_UUID)<EOL>if self._uart is None:<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>self._tx = self._uart.find_characteristic(TX_CHAR_UUID)<EOL>self._rx = self._uart.find_characteristic(RX_CHAR_UUID)<EOL>if self._tx is None or self._rx is None:<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>self._queue = queue.Queue()<EOL>self._rx.start_notify(self._rx_received)<EOL>
Initialize UART from provided bluez device.