code: def unsubscribe_all(self, callback=False):
          
          futures = ((f, r) for f, r in self._requests.items()
                     if isinstance(r, Subscribe)
                     and f not in self._pending_unsubscribes)
          if futures:
              for future, request in futures:
                  if callback:
                      log.warn("Unsubscribing from %s", request.path)
                      cothread.Callback(self.unsubscribe, future)
                  else:
                      self.unsubscribe(future)
docs: Send an unsubscribe for all active subscriptions