def call_method(self, callee, method, objargs=()):
    cname = self.context.insert_const_string(self.module, method)
    fnty = Type.function(self.pyobj, [self.pyobj, self.cstring, self.cstring], var_arg=True)
    fn = self._get_function(fnty, name='PyObject_CallMethod')
    fmt = ('O' * len(objargs))
    cfmt = self.context.insert_const_string(self.module, fmt)
    args = [callee, cname, cfmt]
    if objargs:
        args.extend(objargs)
    args.append(self.context.get_constant_null(types.pyobject))
    return self.builder.call(fn, args)
def call_method(self, callee, method, objargs=()):
    cname = self.context.insert_const_string(self.module, method)
    fnty = Type.function(self.pyobj, [self.pyobj, self.cstring, self.cstring], var_arg=True)
    fn = self._get_function(fnty, name='PyObject_CallMethod')
    fmt = ('O' * len(objargs))
    cfmt = self.context.insert_const_string(self.module, fmt)
    args = [callee, cname, cfmt]
    if objargs:
        args.extend(objargs)
    args.append(self.context.get_constant_null(types.pyobject))
    return self.builder.call(fn, args)