Just as update for everybody is interested and for completeness, I used the Python package Natworkx as suggested by @Cilyan. The package gives me the opportunity to make a graph (as I need) and also supplies a data structure dictionary-like for keeping the information. Starting from one of the picture I got from experiments, the graph is correctly created, as shown in the following picture:
And, the data structure to keep the information looks like this:
nodes of the graph:
[('3-gon', {'points': array([[250, 181],
[133, 43],
[ 21, 188]]),
'center': (139, 135)}),
('4-gon', {'points': array([[251, 184],
[ 22, 192],
[ 41, 350],
[244, 346]]),
'center': (139, 265)}),
('5-gon', {'points': array([[131, 37],
[ 11, 192],
[ 37, 354],
[247, 350],
[256, 182]]),
'center': (138, 223)})]
edges of the graph:
[('3-gon', '5-gon', {'relation': 'inside'}),
('4-gon', '3-gon', {'relation': 'below'}),
('4-gon', '5-gon', {'relation': 'inside'})]
Thanks for your help guys! I've really apreciated.