  
      cdef void parseC(self, Doc tokens, StateClass stcls, Example eg) nogil:
          while not stcls.is_final():
              self.model.set_featuresC(&eg.c, stcls)
              self.moves.set_valid(eg.c.is_valid, stcls)
              self.model.set_scoresC(eg.c.scores, eg.c.features, eg.c.nr_feat)
  
              guess = VecVec.arg_max_if_true(eg.c.scores, eg.c.is_valid, eg.c.nr_class)
  
              action = self.moves.c[guess]
 
</s> remove             is_valid[i] = self.c[i].is_valid(stcls.c, self.c[i].label)
 </s> add             is_valid[i] = self.c[i].is_valid(st, self.c[i].label) </s> remove         self.set_valid(is_valid, stcls)
 </s> add         self.set_valid(is_valid, stcls.c) </s> remove     cdef int set_valid(self, int* is_valid, StateClass stcls) nogil:
 </s> add     cdef int set_valid(self, int* is_valid, const StateC* st) nogil: </s> remove         self.parser.moves.set_valid(self.eg.c.is_valid, self.stcls)
 </s> add         self.parser.moves.set_valid(self.eg.c.is_valid, self.stcls.c) </s> remove     cdef int set_valid(self, int* output, StateClass state) nogil
 </s> add     cdef int set_valid(self, int* output, const StateC* st) nogil
            self.moves.set_valid(eg.c.is_valid, stcls.c)
  
      cdef void parseC(self, Doc tokens, StateClass stcls, Example eg) nogil:
          while not stcls.is_final():
              self.model.set_featuresC(&eg.c, stcls)
            self.moves.set_valid(eg.c.is_valid, stcls.c)
              self.model.set_scoresC(eg.c.scores, eg.c.features, eg.c.nr_feat)
  
              guess = VecVec.arg_max_if_true(eg.c.scores, eg.c.is_valid, eg.c.nr_class)
  
              action = self.moves.c[guess]
keep keep keep keep replace keep keep keep keep keep
 * Pass a StateC pointer into the transition and validation methods in the parser, so that the GIL can be released over a batch of documents 
spacy/syntax/parser.pyx