code: def test_bmt():
      # All tests against SAS
      # Results taken from here:
      # http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_lifetest_details03.htm
  
      # Confidence intervals for 25% percentile of the survival
      # distribution (for "ALL" subjects), taken from the SAS web site
      cb = {
          "linear": [107, 276],
          "cloglog": [86, 230],
          "log": [107, 332],
          "asinsqrt": [104, 276],
          "logit": [104, 230],
      }
  
      dfa = bmt[bmt.Group == "ALL"]
  
      cur_dir = os.path.dirname(os.path.abspath(__file__))
      fp = os.path.join(cur_dir, "results", "bmt_results.csv")
      rslt = pd.read_csv(fp)
  
      sf = SurvfuncRight(dfa["T"].values, dfa.Status.values)
  
      assert_allclose(sf.surv_times, rslt.t)
      assert_allclose(sf.surv_prob, rslt.s, atol=1e-4, rtol=1e-4)
      assert_allclose(sf.surv_prob_se, rslt.se, atol=1e-4, rtol=1e-4)
  
      for method in "linear", "cloglog", "log", "logit", "asinsqrt":
          lcb, ucb = sf.quantile_ci(0.25, method=method)
          assert_allclose(cb[method], np.r_[lcb, ucb])
  
imports: import os
  import numpy
  from statsmodels.duration.survfunc import SurvfuncRight, survdiff, plot_survfunc, CumIncidenceRight
  from numpy.testing import assert_allclose
  import pandas
  import pytest
label_desc: Use image node_id 6 for calling a global function with example usage: test_bmt() without return types