I\'m working with a large existing Python code base, which has an internal graph model, with nodes and edges being regular Python classes. I\'d like to optimize the memory f