code: def ping(self, timeout=0, **kwargs):
          
  
          # http://stackoverflow.com/a/2257449/5006
          def rand_id(size=8, chars=string.ascii_uppercase + string.digits):
              return ''.join(random.choice(chars) for _ in range(size))
  
          payload = rand_id()
          self.ws.ping(payload)
          opcode, data = self.recv_raw(timeout, [websocket.ABNF.OPCODE_PONG], **kwargs)
          if data != payload:
              raise IOError("Pinged server but did not receive correct pong")
docs: THIS DOES NOT WORK, UWSGI DOES NOT RESPOND TO PINGS