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","."]
code: def num_completed(self):
      if self.state == -1:
          return 0
      count = len(
          list(
              filter(
                  lambda x: x,
                  self.sequence.endpoints[0 : self.state + 1],
              )
          )
      )
      return count
  
imports: from collections import Counter
  from typing import List, Optional, Set, Tuple
  import torch
label_desc: Use image node_id 6 for calling the OrderedConstraintState obj's underlying member method code with example usage: obj.num_completed() and returns: count, int