def METHOD_NAME(self):
    mod = self.make_module("""
        #include <Python.h>
        HPyDef_METH(f, "f", HPyFunc_NOARGS)
        static HPy f_impl(HPyContext *ctx, HPy self)
        {
            PyObject *o = PyList_New(0);
            Py_ssize_t initial_refcount = o->ob_refcnt;
            HPy h = HPy_FromPyObject(ctx, o);
            Py_ssize_t final_refcount = o->ob_refcnt;
            PyList_Append(o, PyLong_FromLong(1234));
            PyList_Append(o, PyLong_FromSsize_t(final_refcount -
                                                initial_refcount));
            Py_DECREF(o);
            return h;
        }
        @EXPORT(f)
        @INIT
    """)
    x = mod.f()
    assert x[0] == 1234
    assert len(x) == 2
    if self.supports_refcounts():
        assert x == [1234, +1]