Shape Detection And Mediation Analysis Using Semi-Parametric Shape-Restricted Regression Spline With Applications