src/transformers/generation/beam_search.py/ConstrainedBeamSearchScorer/check_completes_constraints
class ConstrainedBeamSearchScorer:    def check_completes_constraints(self, sequence):
        new_state = self.make_constraint_states(1)[0]
        new_state.reset(sequence)
        return new_state.completed