      def is_valid(self, StateClass stcls, move_name):
          action = self.lookup_transition(move_name)
          return action.is_valid(stcls.c, action.label)
  
      cdef int set_valid(self, int* is_valid, StateClass stcls) nogil:
          cdef int i
          for i in range(self.n_moves):
              is_valid[i] = self.c[i].is_valid(stcls.c, self.c[i].label)
  
      cdef int set_costs(self, int* is_valid, weight_t* costs,
 
</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* output, StateClass state) nogil
 </s> add     cdef int set_valid(self, int* output, 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             self.moves.set_valid(eg.c.is_valid, stcls)
 </s> add             self.moves.set_valid(eg.c.is_valid, stcls.c)
    cdef int set_valid(self, int* is_valid, const StateC* st) nogil:
      def is_valid(self, StateClass stcls, move_name):
          action = self.lookup_transition(move_name)
          return action.is_valid(stcls.c, action.label)
  
    cdef int set_valid(self, int* is_valid, const StateC* st) nogil:
          cdef int i
          for i in range(self.n_moves):
              is_valid[i] = self.c[i].is_valid(stcls.c, self.c[i].label)
  
      cdef int set_costs(self, int* is_valid, weight_t* costs,
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/transition_system.pyx