human
Write me a code to 2 given the following:
2. instance of a class that implements __call__ (functor)"
Please write code following the instructions in jupyter notebook style.
assistant
#Here is code to 2.

class IsEven(object):
    def __call__(self, number):
        return number % 2 == 0
    
count_predicate(IsEven(), numbers)

IsEven()(123)
i = IsEven()
i(12)