+static void convertPyToVectorVectorPairInt(PyObject *pyLi, std::vector< std::vector< std::pair<mcIdType,mcIdType> > >& arr)
+{
+ const char msg[]="list must contain tuples of 2 integers only or tuple must contain tuples of 2 integers only !";
+ if(PyList_Check(pyLi))
+ {
+ std::size_t size=PyList_Size(pyLi);
+ arr.resize(size);
+ for(std::size_t i = 0 ; i < size ; ++i)
+ convertPyToVectorPairInt(PyList_GetItem(pyLi,i),arr[i]);
+ }
+ else if(PyTuple_Check(pyLi))
+ {
+ std::size_t size=PyTuple_Size(pyLi);
+ arr.resize(size);
+ for(std::size_t i = 0 ; i < size ; ++i)
+ convertPyToVectorPairInt(PyTuple_GetItem(pyLi,i),arr[i]);
+ }
+ else
+ throw INTERP_KERNEL::Exception(msg);
+}
+