Using fractional polynomials and restricted cubic splines to model non‐proportional hazards or time‐varying covariate effects in the Cox regression model