code: def test_fit_negative_survial_time_raises(estimator, y_time):
      X = np.random.randn(7, 3)
      y = Surv.from_arrays(
          event=np.ones(7, dtype=bool),
          time=[1, 9, 3, y_time, 1, 8, 1e10],
      )
  
      with pytest.raises(
          ValueError, match="observed time contains values smaller zero"
      ):
          estimator.fit(X, y)
  
file_path: scikit-survival/tests/test_survival_function.py
imports: import numpy
  from numpy.testing import assert_array_almost_equal
  import pytest
  from sksurv.linear_model import CoxnetSurvivalAnalysis
  from sksurv.testing import all_survival_estimators
  from sksurv.util import Surv
label_desc: Use image node_id 3 for calling a global function with example usage: test_fit_negative_survial_time_raises(estimator, y_time) without return types