code: def unsubscribe(self, future):
          
          assert future not in self._pending_unsubscribes, \
              "%r has already been unsubscribed from" % \
              self._pending_unsubscribes[future]
          subscribe = self._requests[future]
          self._pending_unsubscribes[future] = subscribe
          # Clear out the subscription
          self._subscriptions.pop(subscribe.id)
          request = Unsubscribe(subscribe.id)
          request.set_callback(self._q.put)
          try:
              controller = self.get_controller(subscribe.path[0])
          except ValueError:
              # Controller has already gone, probably during tearDown
              pass
          else:
              self.handle_request(controller, request)
docs: Terminates the subscription given by a future
  
          Args:
              future (Future): The future of the original subscription