def __init__(self, negative_sampling_rate, filter_expr=None):
        """Args
            filter_expr: i.e. et(label, 1), select the sample from leader
            meeting label=1
        """
        self._buf = {}
        #FIXME  prev_index should be assigned to the leader restart
        # index after restart.
        self._prev_index = 0
        self._negative_sampling_rate = negative_sampling_rate
        self._field_name = ["label", "joined"]
        self._field_value = [0, 0]
        if filter_expr and len(filter_expr.strip()) > 0:
            self._filter_expr = Expr(filter_expr)
        else:
            self._filter_expr = None
Args
            filter_expr: i.e. et(label, 1), select the sample from leader
            meeting label=1
        
fedlearner/data_join/negative_example_generator.py