code: def construct_survival_curves(hazard_rates, timelines):
      
      cumulative_hazards = cumulative_integral(hazard_rates.values, timelines)
      return pd.DataFrame(np.exp(-cumulative_hazards), index=timelines)
docs: Given hazard rates, reconstruct the survival curves
  
      Parameters
      ----------
      hazard_rates: (n,t) array
      timelines: (t,) the observational times
  
      Returns
      -------
      t: survial curves, (n,t) array