    } catch (std::exception const& e) {
        string s = "Could not index element: " + string(e.what());
        PyErr_SetString(PyExc_BaseException, s.c_str());
        return NULL;
    }
}

PyObject* _GreedyCoverInstance_size(PyObject* self, PyObject* args, PyObject* keywds)
{
    PyObject* py_gci = NULL;
    static const char* kwlist[] = { "gci", NULL };
    if (!PyArg_ParseTupleAndKeywords(args, keywds, "O", (char**)kwlist, &py_gci))
        return NULL;

    try {