[Olena-patches] 3117: Fix/improve graph related classes.