Write Php Script Using User Defined Exceptions In Python 3