code: def _ping_loop(self):
          
          self.pong_received = True
          self.ping_loop_event.clear()
          while self.state == 'connected':
              if not self.pong_received:
                  self.logger.info(
                      'PONG response has not been received, aborting')
                  if self.ws:
                      self.ws.close()
                  self.queue.put(None)
                  break
              self.pong_received = False
              self._send_packet(packet.Packet(packet.PING))
              self.ping_loop_event.wait(timeout=self.ping_interval)
          self.logger.info('Exiting ping task')
docs: This background task sends a PING to the server at the requested
          interval.