code: def _on_new_data_received(self, data: bytes):
          
          if data == b' ':
              # Happens every half hour. Disconnect after 10th time. Some kind of keep-alive? Let's send it back.
              self.loop.call_soon_threadsafe(self.connection.send_raw_data, b' ')
              return
  
          xml_element = BeautifulSoup(data.decode(), features='xml')
          xml_element = next(iter(xml_element)) if len(xml_element) > 0 else xml_element
  
          # choose the handler based on the XML tag name
  
          if xml_element.name == "k":
              self._handle_received_k_element(xml_element)
          if xml_element.name == "iq":
              self._handle_received_iq_element(xml_element)
          elif xml_element.name == "message":
              self._handle_xmpp_message(xml_element)
          elif xml_element.name == 'stc':
              self.callback.on_captcha_received(login.CaptchaElement(xml_element))
docs: Gets called whenever we get a whole new XML element from kik's servers.
          :param data: The data received (bytes)