Add graph helper functions and dependencies