code: def check_cv_coverage(cv, X, y, groups, expected_n_splits):
      n_samples = _num_samples(X)
      # Check that a all the samples appear at least once in a test fold
      assert cv.get_n_splits(X, y, groups) == expected_n_splits
  
      collected_test_samples = set()
      iterations = 0
      for train, test in cv.split(X, y, groups):
          check_valid_split(train, test, n_samples=n_samples)
          iterations += 1
          collected_test_samples.update(test.execute().to_numpy())
  
      # Check that the accumulated test samples cover the whole dataset
      assert iterations == expected_n_splits
      if n_samples is not None:
          assert collected_test_samples == set(range(n_samples))
  
imports: import itertools
  import numpy
  import pandas
  import pytest
  from ....None import dataframe
  from ....None import tensor
  from ....dataframe.core import DATAFRAME_TYPE
  from ....lib.sparse import SparseNDArray
  from ...utils.validation import _num_samples
  from ..None import train_test_split, KFold
label_desc: Use image node_id 11 for calling a global function with example usage: check_cv_coverage(cv, X, y, groups, expected_n_splits) without return types