code: def ping(self):
          
          self.last_ping = time.time()
          try:
              self.send_message({MESSAGE_TYPE: TYPE_PING})
          except NotConnected:
              self._socket_client.logger.error("Chromecast is disconnected. " +
                                               "Cannot ping until reconnected.")
docs: Send a ping message.