code: async def ping(self, reconnect=True):
          
          if self._writer is None and self._reader is None:
              if reconnect:
                  await self._connect()
                  reconnect = False
              else:
                  raise Error("Already closed")
          try:
              await self._execute_command(COMMAND.COM_PING, "")
              await self._read_ok_packet()
          except Exception:
              if reconnect:
                  await self._connect()
                  await self.ping(False)
              else:
                  raise
docs: Check if the server is alive