code: def test_nan_support():
      # Make sure nans are OK if the underlying estimator supports nans
  
      rng = np.random.RandomState(0)
      n_samples, n_features = 40, 4
      X, y = make_regression(n_samples, n_features, random_state=0)
      nan_mask = rng.randint(
          0, 2, size=(n_samples, n_features), dtype=bool
      )
      X[nan_mask] = np.nan
      sfs = SequentialFeatureSelector(
          HistGradientBoostingRegressor(),
          n_features_to_select="auto",
          cv=2,
      )
      sfs.fit(X, y)
      sfs.transform(X)
  
      with pytest.raises(ValueError, match="Input X contains NaN"):
          # LinearRegression does not support nans
          SequentialFeatureSelector(
              LinearRegression(), n_features_to_select="auto", cv=2
          ).fit(X, y)
  
imports: import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from sklearn.cluster import KMeans
  from sklearn.datasets import make_blobs, make_classification, make_regression
  from sklearn.ensemble import HistGradientBoostingRegressor
  from sklearn.feature_selection import SequentialFeatureSelector
  from sklearn.linear_model import LinearRegression
  from sklearn.model_selection import LeaveOneGroupOut, cross_val_score
  from sklearn.neighbors import KNeighborsClassifier
  from sklearn.pipeline import make_pipeline
  from sklearn.preprocessing import StandardScaler
  from sklearn.utils.fixes import CSR_CONTAINERS
label_desc: Use image node_id 8 for calling a global function with example usage: test_nan_support() without return types