src/transformers/generation/beam_constraints.py/DisjunctiveTrie/reached_leaf
class DisjunctiveTrie:    def reached_leaf(self, current_seq):
        next_tokens = self.next_tokens(current_seq)

        return len(next_tokens) == 0