docs: def precision(classifier, testset):
      """
      Runs the classifier for each example in `testset`
      and verifies that the classification is correct
      using the `target`.
  
      Returns a number between 0.0 and 1.0 with the
      precision of classification for this test set.
      """
  
      hit = 0
      total = 0
      for example in testset:
          if classifier.classify(example)[0] == classifier.target(example):
              hit += 1
          total += 1
      if total == 0:
          raise ValueError("Empty testset!")
      return hit / float(total)