def message_received(self, message):
<EOL>identifier = message.identifier or '<STR_LIT>' + str(message.type)<EOL>if identifier in self._outstanding:<EOL><INDENT>outstanding = OutstandingMessage(<EOL>self._outstanding[identifier].semaphore, message)<EOL>self._outstanding[identifier] = outstanding<EOL>self._outstanding[identifier].semaphore.release()<EOL><DEDENT>else:<EOL><INDENT>asyncio.ensure_future(self._dispatch(message), loop=self.loop)<EOL><DEDENT>
Message was received from device.