def METHOD_NAME(self, labels):
    label_set = frozenset(labels.items())
    labels.update(self.unconditional_labels)
    for matching_label_set, shared_labels in self.label_sets:
        # Check for subset without incurring the cost of a `.issubset` lookup and call
        if matching_label_set <= label_set:
            labels.update(shared_labels)