code: def removable(self, node):
      '''
      node is removable only if all of its children are as well.
      '''
      throw_away = []
      for child in self.children(node):
          throw_away.append(self.visit(child))
  
      if self.mode == 'exclusive':
          return all(throw_away)
      elif self.mode == 'inclusive':
          return any(throw_away)
      else:
          raise TypeError("mode must be one of 'exclusive' or 'inclusive'"f removable(self, node):
      '''
      node is removable only if all of its children are as well.
      '''
      throw_away = []
      for child in self.children(node):
          throw_away.append(self.visit(child))
  
      if self.mode == 'exclusive':
          return all(throw_away)
      elif self.mode == 'inclusive':
          return any(throw_away)
      else:
          raise TypeError("mode must be one of 'exclusive' or 'inclusive'")
docs: node is removable only if all of its children are as well.