function classify(record, tree):
   if tree.is_leaf:

      return tree.label
   if record[tree.question.feature] <= tree.question.threshold:
      return classify(record, tree.left)
   return classify(record, tree.right)
 # each internal node asks one yes/no question about one feature
