code: def get_or_wait(self, path, name):
          
  
          # First, get children and watch folder.
          d, watch = self.get_children_and_watch(path)
  
          deferred = Deferred()
          path += "/" + name
  
          @watch.addCallback
          def _notify(event):
              if event.type_name == "child":
                  d = self.get(path)
                  d.addCallback(deferred.callback)
  
          # Retrieve children.
          children = yield d
  
          if name in children:
              watch.cancel()
              deferred = self.get(path)
  
          result = yield deferred
          returnValue(result)
docs: Get data of node under path, or wait for it.