code: def test_missing_values_best_splitter_to_max_samples(veterans):
      X, y = veterans
      X = X.loc[:, "Karnofsky_score"].values[:, np.newaxis]
      X = X.astype(np.float32)
  
      tree = SurvivalTree(max_depth=1)
      tree.fit(X, y)
  
      y_pred_chf = tree.predict_cumulative_hazard_function(
          [[np.nan]], return_array=True
      )
      y_pred_surv = tree.predict_survival_function(
          [[np.nan]], return_array=True
      )
      y_pred = np.column_stack((y_pred_chf[0], y_pred_surv[0]))
  
      # missing values go to node with the most samples
      assert np.argmax(tree.tree_.n_node_samples[1:]) == 1
      y_expected = tree.tree_.value[2]
      assert_array_almost_equal(y_pred, y_expected)
  
imports: from itertools import product
  from queue import LifoQueue
  import numpy
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  import pandas
  import pytest
  from scipy import sparse
  from sklearn.model_selection import train_test_split
  from sklearn.pipeline import make_pipeline
  from sklearn.preprocessing import OrdinalEncoder
  from sklearn.tree._tree import TREE_UNDEFINED
  from sksurv.compare import compare_survival
  from sksurv.datasets import load_breast_cancer, load_veterans_lung_cancer
  from sksurv.nonparametric import kaplan_meier_estimator, nelson_aalen_estimator
  from sksurv.tree import SurvivalTree
  from sksurv.util import Surv
label_desc: Use image node_id 28 for calling a global function with example usage: test_missing_values_best_splitter_to_max_samples(veterans) without return types