code: def to_dict(self) -> Dict[str, Any]:
      config = {
          "cv_type": self.cv_type.value,
          "n_folds": self.n_folds,
      }
      if self.shuffle_kfold is not None:
          config["shuffle_kfold"] = self.shuffle_kfold
      if self.test_size is not None:
          config["test_size"] = self.test_size
      return config
  
file_path: upgini/src/upgini/utils/cv_utils.py
imports: from typing import Any, Dict, Optional, Union
  import pandas
  from sklearn.model_selection import BaseCrossValidator, KFold, TimeSeriesSplit, GroupKFold, GroupShuffleSplit
  from upgini.metadata import CVType
  from upgini.utils.blocked_time_series import BlockedTimeSeriesSplit
label_desc: Use image node_id 2 for calling the CVConfig obj's underlying member method code with example usage: obj.to_dict() and returns: config