code: def _commit_removals(self):
      pop = self._pending_removals.pop
      discard = self.data.discard
      while True:
          try:
              item = pop()
          except IndexError:
              return
          discard(item)
  
imports: from _weakref import ref
  from types import GenericAlias
label_desc: Use image node_id 2 for calling the WeakSet obj's underlying member method code with example usage: obj._commit_removals() without return types