Reformatted python code using Pycharm