code: def _done_cb(self, future):
      with self.lock:
          for item in self.pending:
              item.cancel()
          self.future = None
          self.result = None
          self.pending = None
      if future.cancelled():
          future.set_running_or_notify_cancel()
  
file_path: mpi4py/src/mpi4py/futures/util.py
imports: import collections
  import functools
  import threading
  from .None import _base
label_desc: Use image node_id 4 for calling the _Collect obj's underlying member method code with example usage: obj._done_cb(future) without return types