the sgd python file