code: def test_subsample_splitter_determinism(subsample_test):
      # Make sure _SubsampleMetaSplitter is consistent across calls to split():
      # - we're OK having training sets differ (they're always sampled with a
      #   different fraction anyway)
      # - when we don't subsample the test set, we want it to be always the same.
      #   This check is the most important. This is ensured by the determinism
      #   of the base_cv.
  
      # Note: we could force both train and test splits to be always the same if
      # we drew an int seed in _SubsampleMetaSplitter.__init__
  
      n_samples = 100
      X, y = make_classification(n_samples)
      cv = _SubsampleMetaSplitter(
          base_cv=KFold(5),
          fraction=0.5,
          subsample_test=subsample_test,
          random_state=None,
      )
  
      folds_a = list(cv.split(X, y, groups=None))
      folds_b = list(cv.split(X, y, groups=None))
  
      for (train_a, test_a), (train_b, test_b) in zip(folds_a, folds_b):
          assert not np.all(train_a == train_b)
  
          if subsample_test:
              assert not np.all(test_a == test_b)
          else:
              assert np.all(test_a == test_b)
              assert np.all(X[test_a] == X[test_b])
  
imports: from math import ceil
  import numpy
  import pytest
  from scipy.stats import expon, norm, randint
  from sklearn.datasets import make_classification
  from sklearn.dummy import DummyClassifier
  from sklearn.experimental import enable_halving_search_cv
  from sklearn.model_selection import GroupKFold, GroupShuffleSplit, HalvingGridSearchCV, HalvingRandomSearchCV, KFold, LeaveOneGroupOut, LeavePGroupsOut, ShuffleSplit, StratifiedKFold, StratifiedShuffleSplit
  from sklearn.model_selection._search_successive_halving import _SubsampleMetaSplitter, _top_k
  from sklearn.model_selection.tests.test_search import check_cv_results_array_types, check_cv_results_keys
  from sklearn.svm import SVC, LinearSVC
label_desc: Use image node_id 11 for calling a global function with example usage: test_subsample_splitter_determinism(subsample_test) without return types