<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def do_exists(self, params):
 """ \x1b[1mNAME\x1b[0m exists - Gets the znode's stat information \x1b[1mSYNOPSIS\x1b[0m exists <path> [watch] [pretty_date] \x1b[1mOPTIONS\x1b[0m * watch: set a (data) watch on the path (default: false) \x1b[1mEXAMPLES\x1b[0m exists /foo Stat( czxid=101, mzxid=102, ctime=1382820644375, mtime=1382820693801, version=1, cversion=0, aversion=0, ephemeralOwner=0, dataLength=6, numChildren=0, pzxid=101 ) # sets a watch > exists /foo true # trigger the watch > rm /foo WatchedEvent(type='DELETED', state='CONNECTED', path=u'/foo') """

        watcher = lambda evt: self.show_output(str(evt))
        kwargs = {"watch": watcher} if params.watch else {}
        pretty = params.pretty_date
        path = self.resolve_path(params.path)
        stat = self._zk.exists(path, **kwargs)
        if stat:
            session = stat.ephemeralOwner if stat.ephemeralOwner else 0
            self.show_output("Stat(")
            self.show_output("  czxid=0x%x", stat.czxid)
            self.show_output("  mzxid=0x%x", stat.mzxid)
            self.show_output("  ctime=%s", time.ctime(stat.created) if pretty else stat.ctime)
            self.show_output("  mtime=%s", time.ctime(stat.last_modified) if pretty else stat.mtime)
            self.show_output("  version=%s", stat.version)
            self.show_output("  cversion=%s", stat.cversion)
            self.show_output("  aversion=%s", stat.aversion)
            self.show_output("  ephemeralOwner=0x%x", session)
            self.show_output("  dataLength=%s", stat.dataLength)
            self.show_output("  numChildren=%s", stat.numChildren)
            self.show_output("  pzxid=0x%x", stat.pzxid)
            self.show_output(")")
        else:
            self.show_output("Path %s doesn't exist", params.path)