code: def test_kfold_valueerrors():
      X1 = np.array([[1, 2], [3, 4], [5, 6]])
      # Check that errors are raised if there is not enough samples
      with pytest.raises(ValueError):
          next(KFold(4).split(X1))
  
      # Error when number of folds is <= 1
      with pytest.raises(ValueError):
          KFold(0)
      with pytest.raises(ValueError):
          KFold(1)
  
      # When n_splits is not integer:
      with pytest.raises(ValueError):
          KFold(1.5)
      with pytest.raises(ValueError):
          KFold(2.0)
  
      # When shuffle is not  a bool:
      with pytest.raises(TypeError):
          KFold(n_splits=4, shuffle=None)
  
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 9 for calling a global function with example usage: test_kfold_valueerrors() without return types