How To Define Graph In Python