moving json_graph classes to utils.py