code: def to_dict(self):
      
      return {
          "node": [v.to_dict() for v in self.vertices],
          "edge": [e.to_dict() for e in self.edges]
      }
docs: Returns a simplified dictionary representing the Graph.
  
      Returns:
        A dictionary that can easily be serialized to JSON.