code: def received(self, messages):
          
          if messages:
              if self._queue:
                  self._queue.put_nowait(messages)
  
              if self._callback:
                  self._callback(messages)
docs: Called when new messages arrive.
  
          Args:
              messages (tuple): Messages