code: def unused(self):
      
      unused = self.definitions - self.used
      # Filter (variable_name,node) pairs that should be removed, because
      # node is used elsewhere
      used_nodes = set([u[1] for u in self.used])
      unused = set([u for u in unused if u[1] not in used_nodes])
      return unused
docs: Calculate which AST nodes are unused.
  
      Note that we have to take special care in the case of
      x,y = f(z) where x is used later, but y is not.