'Release the GIL and return the former thread state
(an opaque non-NULL pointer).'

def save_thread(self):

    fnty = Type.function(self.voidptr, [])
    fn = self._get_function(fnty, name='PyEval_SaveThread')
    return self.builder.call(fn, [])
