code: def test_survfunc_entry_3():
      # times = c(1, 2, 5, 6, 6, 6, 6, 6, 9)
      # status = c(0, 0, 1, 1, 1, 0, 1, 1, 0)
      # entry = c(0, 1, 1, 2, 2, 2, 3, 4, 4)
      # sv = Surv(entry, times, event=status)
      # sdf = survfit(coxph(sv ~ 1), type='kaplan-meier')
  
      times = np.r_[1, 2, 5, 6, 6, 6, 6, 6, 9]
      status = np.r_[0, 0, 1, 1, 1, 0, 1, 1, 0]
      entry = np.r_[0, 1, 1, 2, 2, 2, 3, 4, 4]
  
      sf = SurvfuncRight(times, status, entry=entry)
  
      assert_allclose(sf.n_risk, np.r_[7, 6])
      assert_allclose(sf.surv_times, np.r_[5, 6])
      assert_allclose(
          sf.surv_prob, np.r_[0.857143, 0.285714], atol=1e-5
      )
      assert_allclose(
          sf.surv_prob_se, np.r_[0.13226, 0.170747], atol=1e-5
      )
  
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 14 for calling a global function with example usage: test_survfunc_entry_3() without return types