def METHOD_NAME(self, pii_labels, query):
    """Add where clause to query"""
    conditions = []
    for label in pii_labels:
        table_col = getattr(self.table, label)
        options = [
            table_col == self.payload[label],
            table_col,
            table_col != self.payload[label],
            (table_col == self.payload[label]) | (table_col == self.providers.get_faker("word")()),
        ]
        # todo: remove useful try except? What does the first cast to int do?
        try:
            int(self.payload[label])
            options.append(table_col > random.randint(0, 1000))
            options.append(table_col < random.randint(0, 1000))
            options.append(table_col <= random.randint(0, 1000))
            options.append(table_col >= random.randint(0, 1000))
        except Exception:
            pass
        conditions.append(self.get_random_val(options))
    conditions = Criterion.all(conditions)
    query = query(conditions)
    return query