'Args:
ds (DataFlow): input DataFlow
func (datapoint -> datapoint | None): takes a datapoint and returns a new
datapoint. Return None to discard this data point.
Note that if you use the filter feature, ``ds.size()`` will be incorrect.
Note:
Please make sure func doesn\'t modify the components
unless you\'re certain it\'s safe.'

def __init__(self, ds, func):

    super(MapData, self).__init__(ds)
    self.func = func
