docstr: Represents a set of possibly multitoken constraints by
  concatenating them and internally recording the end points.
docstr_tok: ["Represents","a","set","of","possibly","multitoken","constraints","by","concatenating","them","and","internally","recording","the","end","points","."]
code: def __init__(self, sequences: List[List[int]]):
      """Represents a set of possibly multitoken constraints by
      concatenating them and internally recording the end points.
      """
      self.sequences = []
      self.endpoints = []
      self.num_tokens = 0
      self.tokens = set()
      for sequence in sequences:
          for token in sequence:
              self.tokens.add(token)
          self.num_tokens += len(sequence)
          self.endpoints += [
              False for x in range(len(sequence) - 1)
          ] + [True]
          self.sequences += sequence
  
imports: from collections import Counter
  from typing import List, Optional, Set, Tuple
  import torch
label_desc: Use image node_id 1 to create a new ConstraintSequence object  with example: obj = ConstraintSequence(sequences)