code: def cv_iterator(X, y, n_folds):
      """Returns X_train, y_train, X_test, y_test for each of the folds"""
      data_size = len(y)
      test_size = data_size // n_folds
      for i in range(n_folds):
          train = list(
              itertools.chain(
                  range(i * test_size),
                  range((i + 1) * test_size, data_size),
              )
          )
          test = range(i * test_size, (i + 1) * test_size)
          yield X[train], y[train], X[test], y[test]
  
imports: import neoml
  import numpy
  import itertools
  from sklearn.datasets import load_boston
label_desc: Use image node_id 2 for calling a global function with example usage: cv_iterator(X, y, n_folds) without return types