code: def generate_data(n=20000):
      X = np.random.binomial(1, 0.5, size=n)
      Z = np.random.normal(0, 4, size=n)
      T_actual = np.random.exponential(1 / np.exp(-5 + 1 * X + 1 * Z))
      C = 10 * np.random.random(size=n)
  
      T_observed = np.minimum(T_actual, C)
      E = T_actual < C
      return pd.DataFrame({"X": X, "E": E, "T": T_observed, "Z": Z})
  
file_path: lifelines/examples/crowther_royston_clements_splines.py
imports: import pandas
  from autograd import numpy
  from lifelines.fitters import ParametricRegressionFitter
  from lifelines import WeibullAFTFitter
  from lifelines.fitters.mixins import SplineFitterMixin
  from lifelines.utils.safe_exp import safe_exp
label_desc: Use image node_id 1 for calling a global function with example usage: generate_data(n) and returns: pd