def METHOD_NAME(self, tuples):
    if self.bin_threshold is not None:
        def binarize(t):
            t = list(t)
            t[2] = 1.0
            return tuple(t)
        tuples = [binarize(t) for t in tuples if t[2] >= self.bin_threshold]
    if self.user_set is not None:
        tuples = [t for t in tuples if t[0] in self.user_set]
    if self.item_set is not None:
        tuples = [t for t in tuples if t[1] in self.item_set]
    if self.min_uf > 1:
        user_freq = Counter(t[0] for t in tuples)
        tuples = [t for t in tuples if user_freq[t[0]] >= self.min_uf]
    if self.min_if > 1:
        item_freq = Counter(t[1] for t in tuples)
        tuples = [t for t in tuples if item_freq[t[1]] >= self.min_if]
    return tuples