code: def test_survdiff_entry_3():
      # Tests against Stata:
      #
      # stset time, failure(status) entry(entry)
      # sts test group, logrank
  
      ti = np.r_[2, 1, 5, 8, 7, 8, 8, 9, 4, 9]
      st = np.r_[1, 1, 1, 1, 1, 0, 1, 0, 0, 0]
      gr = np.r_[0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
      entry = np.r_[1, 1, 2, 2, 3, 3, 2, 1, 2, 0]
  
      # Check with no entry times
      z, p = survdiff(ti, st, gr)
      assert_allclose(z, 6.9543024)
      assert_allclose(p, 0.008361789)
  
      # Check with entry times
      z, p = survdiff(ti, st, gr, entry=entry)
      assert_allclose(z, 6.75082959)
      assert_allclose(p, 0.00937041)
  
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 17 for calling a global function with example usage: test_survdiff_entry_3() without return types