Debugging graphs code