code: def watch(self, key, **kwargs):
          
          event_queue = queue.Queue()
  
          def callback(event):
              event_queue.put(event)
  
          watch_id = self.add_watch_callback(key, callback, **kwargs)
          canceled = threading.Event()
  
          def cancel():
              canceled.set()
              event_queue.put(None)
              self.cancel_watch(watch_id)
  
          @_handle_errors
          def iterator():
              while not canceled.is_set():
                  event = event_queue.get()
                  if event is None:
                      canceled.set()
                  if isinstance(event, Exception):
                      canceled.set()
                      raise event
                  if not canceled.is_set():
                      yield event
  
          return iterator(), cancel
docs: Watch a key.
  
          Example usage:
  
          .. code-block:: python
              events_iterator, cancel = etcd.watch('/doot/key')
              for event in events_iterator:
                  print(event)
  
          :param key: key to watch
  
          :returns: tuple of ``events_iterator`` and ``cancel``.
                    Use ``events_iterator`` to get the events of key changes
                    and ``cancel`` to cancel the watch request