':param filter_fn: a lambda or function that will be passed a datum and
return either the (optionally modified) datum or None.'

def __init__(self, source, filter_fn=None, **kwargs):

    super(FilteredDataProvider, self).__init__(source, **kwargs)
    self.filter_fn = (filter_fn if hasattr(filter_fn, '__call__') else None)
    self.num_data_read = 0
    self.num_valid_data_read = 0
    self.num_data_returned = 0
