class_docstr: Records progress through the set of linear nonbranching constraints with gaps.
class_docstr_tok: ["Records","progress","through","the","set","of","linear","nonbranching","constraints","with","gaps","."]
docstr: Returns the list of tokens that could come next.
  These are (a) all tokens extending the root state and, for
  non-root states, additionally all tokens extending the current
  state.
docstr_tok: ["Returns","the","list","of","tokens","that","could","come","next",".","These","are","(","a",")","all","tokens","extending","the","root","state","and",",","for","non-root","states",",","additionally","all","tokens","extending","the","current","state","."]
code: def next_tokens(self) -> Set[int]:
      """Returns the list of tokens that could come next.
      These are (a) all tokens extending the root state and, for
      non-root states, additionally all tokens extending the current
      state."""
  
      tokens = set()
      if self.state > 0:
          tokens.add(self.sequence[0])
      if not self.finished:
          tokens.add(self.sequence[self.state + 1])
      return tokens
  
imports: from collections import Counter
  from typing import List, Optional, Set, Tuple
  import torch
label_desc: Use image node_id 14 for calling the OrderedConstraintState obj's underlying member method code with example usage: obj.next_tokens() and returns: tokens