code: def _gc_dead_sinks(self):
          
          deadsinks = []
          for i in self._sinks:
              if i() is None:
                  deadsinks.append(i)
          for i in deadsinks:
              self._sinks.remove(i)
docs: Remove any dead weakrefs.