Python version of idd_Norm_Shock.m script