docstr: Set :attr:`folds` per `cv_type` and :attr:`cv_params`
docstr_tok: ["Set",":","attr",":","`","folds","`","per","`","cv_type","`","and",":","attr",":","`","cv_params","`"]
code: def _initialize_folds(self):
      """Set :attr:`folds` per `cv_type` and :attr:`cv_params`"""
      cv_type = self.experiment_params["cv_type"]  # Allow failure
      if not isclass(cv_type):
          raise TypeError(
              f"Expected a cross-validation class, not {type(cv_type)}"
          )
  
      try:
          _split_method = getattr(cv_type, "split")
          if not callable(_split_method):
              raise TypeError(
                  "`cv_type` must implement a callable :meth:`split`"
              )
      except AttributeError:
          raise AttributeError(
              "`cv_type` must be class with :meth:`split`"
          )
  
      self.folds = cv_type(**self.cv_params)
  
imports: from hyperparameter_hunter.algorithm_handlers import identify_algorithm, identify_algorithm_hyperparameters
  from hyperparameter_hunter.data import TrainDataset, OOFDataset, HoldoutDataset, TestDataset
  from hyperparameter_hunter.experiment_core import ExperimentMeta
  from hyperparameter_hunter.feature_engineering import FeatureEngineer
  from hyperparameter_hunter.i_o.exceptions import EnvironmentInactiveError, EnvironmentInvalidError, RepeatedExperimentError
  from hyperparameter_hunter.i_o.recorders import RecorderList
  from hyperparameter_hunter.keys.makers import HyperparameterKeyMaker
  from hyperparameter_hunter.metrics import ScoringMixIn, get_formatted_target_metric
  from hyperparameter_hunter.models import model_selector
  from hyperparameter_hunter.settings import G
  from hyperparameter_hunter.utils.file_utils import RetryMakeDirs
  from abc import abstractmethod
  from copy import deepcopy
  from inspect import isclass
  import numpy
  import pandas
  import random
  import shutil
  from sys import exc_info
  from uuid import uuid4
  import warnings
  import sklearn.utils
label_desc: Use image node_id 2 for calling the CVExperiment obj's underlying member method code with example usage: obj._initialize_folds() without return types