'Restore the given thread state by reacquiring the GIL.'

def restore_thread(self, thread_state):

    fnty = Type.function(Type.void(), [self.voidptr])
    fn = self._get_function(fnty, name='PyEval_RestoreThread')
    self.builder.call(fn, [thread_state])
