def err_occurred(self):
    fnty = Type.function(self.pyobj, ())
    fn = self._get_function(fnty, name='PyErr_Occurred')
    return self.builder.call(fn, ())
def err_occurred(self):
    fnty = Type.function(self.pyobj, ())
    fn = self._get_function(fnty, name='PyErr_Occurred')
    return self.builder.call(fn, ())