Added graph theory py file,moved some functions to helper.py