code: def learn(self, examples, attributes, parent_examples):
          
          if not examples:
              return self.plurality_value(parent_examples)
          elif len(set(map(self.target, examples))) == 1:
              return self.plurality_value(examples)
          elif not attributes:
              return self.plurality_value(examples)
          A = max(attributes, key=lambda a: self.importance(a, examples))
          tree = DecisionTreeNode(attribute=A)
          for value in set(map(A, examples)):
              exs = [e for e in examples if A(e) == value]
              subtree = self.learn(exs, attributes - set([A]), examples)
              tree.add_branch(value, subtree)
          return tree
docs: A decision tree learner that *strictly* follows the pseudocode given in
          AIMA. In 3rd edition, see Figure 18.5, page 702.