I have not written the whole source code of steganography.py file. I have only added little things to improve the workflow. If you are interested in the original source code, you can find it here:
https://github.com/rroy1212/Image_Steganography/blob/master/ImageSteganography.ipynb