code: def test_max_features_invalid(fake_data, val):
      X, y = fake_data
      tree = SurvivalTree(max_features=val)
  
      msg = (
          r"The 'max_features' parameter of SurvivalTree must be "
          r"an int in the range \[1, inf\), a float in the range \(0\.0, 1\.0\], "
          r"a str among {.+} or None\."
      )
      with pytest.raises(ValueError, match=msg):
          tree.fit(X, y)
  
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 21 for calling a global function with example usage: test_max_features_invalid(fake_data, val) without return types