code: def test_survfunc2():
      # Test where some times have no events.
  
      sr = SurvfuncRight(ti2, st2)
      assert_allclose(sr.surv_prob, surv_prob2, atol=1e-5, rtol=1e-5)
      assert_allclose(
          sr.surv_prob_se, surv_prob_se2, atol=1e-5, rtol=1e-5
      )
      assert_allclose(sr.surv_times, times2)
      assert_allclose(sr.n_risk, n_risk2)
      assert_allclose(sr.n_events, n_events2)
  
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 3 for calling a global function with example usage: test_survfunc2() without return types