code: def test_missing_values_best_splitter_to_right():
      X = np.array([[np.nan] * 8 + list(range(7))], dtype=np.float32).T
      y = Surv.from_arrays(
          time=np.concatenate((np.arange(8) + 10, np.arange(6, 13))),
          event=np.ones(15, dtype=bool),
      )
  
      tree = SurvivalTree(max_depth=2)
      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 the right
      y_expected = tree.tree_.value[4]
      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 29 for calling a global function with example usage: test_missing_values_best_splitter_to_right() without return types