<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filter(self, callback=None):
 """ Run a filter over each of the items. :param callback: The filter callback :type callback: callable or None :rtype: Collection """

        if callback:
            return self.__class__(list(filter(callback, self.items)))

        return self.__class__(list(filter(None, self.items)))