code: def gen_outcome(otype, mtime0):
      if otype == "full":
          lp = 0.5 * mtime0
      elif otype == "no":
          lp = exp
      else:
          lp = exp + mtime0
      mn = np.exp(-lp)
      ytime0 = -mn * np.log(np.random.uniform(size=n))
      ctime = -2 * mn * np.log(np.random.uniform(size=n))
      ystatus = (ctime >= ytime0).astype(int)
      ytime = np.where(ytime0 <= ctime, ytime0, ctime)
      return ytime, ystatus
  
file_path: statsmodels/examples/python/mediation_survival.py
imports: import pandas
  import numpy
  import statsmodels.api
  from statsmodels.stats.mediation import Mediation
label_desc: Use image node_id 2 for calling a global function with example usage: gen_outcome(otype, mtime0) and returns: ytime,  ystatus