code: function deserialize(serialized){
      serialized.nodes.forEach(function (node){ addNode(node.id); });
      serialized.links.forEach(function (link){ addEdge(link.source, link.target, link.weight); });
      return graph;
    }
docs: Deserializes the given serialized graph.