class_docstr: Splitter of data that provides generator of test-train splits.
  Can provide hold-out validation and k-fold validation.
  
  :param cv_folds: Number of folds on data for cross-validation.
  If provided, then cross validation is used. Otherwise, hold-out validation is used.
  :param validation_blocks: Validation blocks count.
  Applied only for time series data.
  If not provided, then value will be calculated.
  :param split_ratio: Ratio of data for splitting.
  Applied only in case of hold-out split.
  If not provided, then default split ratios will be used.
  :param shuffle: Is shuffling required for data.
  :param stratify: If True then stratification is used for samples
  :param random_seed: Random seed for shuffle.
  :param log: Log for logging.
class_docstr_tok: ["Splitter","of","data","that","provides","generator","of","test-train","splits",".","Can","provide","hold-out","validation","and","k-fold","validation",".",":","param","cv_folds",":","Number","of","folds","on","data","for","cross-validation",".","If","provided",",","then","cross","validation","is","used",".","Otherwise",",","hold-out","validation","is","used",".",":","param","validation_blocks",":","Validation","blocks","count",".","Applied","only","for","time","series","data",".","If","not","provided",",","then","value","will","be","calculated",".",":","param","split_ratio",":","Ratio","of","data","for","splitting",".","Applied","only","in","case","of","hold-out","split",".","If","not","provided",",","then","default","split","ratios","will","be","used",".",":","param","shuffle",":","Is","shuffling","required","for","data",".",":","param","stratify",":","If","True","then","stratification","is","used","for","samples",":","param","random_seed",":","Random","seed","for","shuffle",".",":","param","log",":","Log","for","logging","."]
code: def _propose_cv_folds_and_validation_blocks(
      self, data, expected_window_size=20
  ):
      data_shape = data.target.shape[0]
      # first expected_window_size points should to be guaranteed for prediction at fit stage
      data_shape -= expected_window_size
      forecast_length = data.task.task_params.forecast_length
      # check that cv folds may be realized
      if self.cv_folds is not None:
          max_test_size = data_shape / (self.cv_folds + 1)
          if forecast_length > max_test_size:
              proposed_cv_folds_count = int(
                  (data_shape - forecast_length) // forecast_length
              )
              if proposed_cv_folds_count >= 2:
                  self.log.info(
                      (
                          f"Cross validation  with {self.cv_folds} folds cannot be provided"
                          f" with forecast length {data.task.task_params.forecast_length}"
                          f" and full data length {data.target.shape[0]}."
                          f" Cross validation folds is set to {proposed_cv_folds_count}"
                      )
                  )
                  self.cv_folds = proposed_cv_folds_count
              else:
                  self.cv_folds = None
                  self.log.info(
                      (
                          "Cross validation cannot be provided"
                          f" with forecast length {data.task.task_params.forecast_length}"
                          f" and full data length {data.target.shape[0]}."
                          " Cross validation is switched off."
                      )
                  )
  
      if self.cv_folds is None:
          test_shape = int(data_shape * (1 - self.split_ratio))
          if forecast_length > test_shape:
              self.split_ratio = 1 - forecast_length / data_shape
              self.log.info(
                  (
                      f"Forecast length ({forecast_length}) is greater than test length"
                      f" ({test_shape}) defined by split ratio."
                      f" Split ratio is changed to {self.split_ratio}."
                  )
              )
          test_share = 1 - self.split_ratio
      else:
          test_share = 1 / (self.cv_folds + 1)
      self.validation_blocks = int(
          data_shape * test_share // forecast_length
      )
  
file_path: FEDOT/fedot/core/optimisers/objective/data_source_splitter.py
imports: from functools import partial
  from typing import Optional, Union
  from golem.core.log import default_log
  from fedot.core.constants import default_data_split_ratio_by_task
  from fedot.core.data.data import InputData
  from fedot.core.data.data_split import train_test_data_setup, _are_stratification_allowed
  from fedot.core.data.multi_modal import MultiModalData
  from fedot.core.optimisers.objective.data_objective_eval import DataSource
  from fedot.core.repository.tasks import TaskTypesEnum
  from fedot.remote.remote_evaluator import RemoteEvaluator, init_data_for_remote_execution
  from fedot.core.data.cv_folds import cv_generator
label_desc: Use image node_id 5 for calling the DataSourceSplitter obj's underlying member method code with example usage: obj._propose_cv_folds_and_validation_blocks(data, expected_window_size) without return types