human
I am working on the file "DecisionTree_Math_Fruits.ipynb".
The first task is:
2. Leaf node - Gives prediction
Can you write Python program for it?

=====
Write me a the Python program you requested?
assistant
#Here is the Python program you requested.

"""
A Leaf node classifies data.
This holds a dictionary of class (e.g., "Apple") -> number of time it 
appears in the rows from the training data that reach this leaf.
"""

class Leaf:
    def __init__(self, rows):
        self.predictions = class_counts(rows)