code: def constant_coefficients(d, timelines, constant=True, independent=0):
      """
      Proportional hazards model.
  
      d: the dimension of the dataset
      timelines: the observational times
      constant: True for constant coefficients
      independent: the number of coffients to set to 0 (covariate is ind of survival), or
        a list of covariates to make independent.
  
      returns a matrix (t,d+1) of coefficients
      """
      return time_varying_coefficients(
          d,
          timelines,
          constant,
          independent=independent,
          randgen=random.normal,
      )
  
imports: import numpy
  import pandas
  from scipy import stats
  from scipy.optimize import newton
  from scipy.integrate import cumtrapz
label_desc: Use image node_id 10 for calling a global function with example usage: constant_coefficients(d, timelines, constant, independent) and returns: time_varying_coefficients