graph = {
const graph = new Graph();
cleanNodes.forEach((n,i)=>{
const attributes = {...n, size: nodesSize}
graph.addNode(n.id, attributes)
});
cleanEdges.forEach(e=>{
const attributes = {
category: e.type,
weight: e.weight
}
graph.addEdge(e.source, e.target, attributes)
});
return graph;
}