Update graph.py

Add AvgDegree()