if ( PyDict_Check( res1 ) ) {
PyObject* key;
PyObject* value;
int pos = 0;
Py_ssize_t pos = 0;
while ( PyDict_Next( res1, &pos, &key, &value ) ) {
// parse the return value
// it should be a map: {integer:integer}