code: def gen_mediator():
      mn = np.exp(exp)
      mtime0 = -mn * np.log(np.random.uniform(size=n))
      ctime = -2 * mn * np.log(np.random.uniform(size=n))
      mstatus = (ctime >= mtime0).astype(int)
      mtime = np.where(mtime0 <= ctime, mtime0, ctime)
      return mtime0, mtime, mstatus
  
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 1 for calling a global function with example usage: gen_mediator() and returns: mtime0,  mtime,  mstatus