Adding python interface for graph input