code: def change_savepath_for_model(config):
      params_helper = ParamsSearch()
  
      dirs_for_saved_models = set()
      for p in params_helper.find_model_path(
          config, SAVE_PATH_ELEMENT_NAME
      ):
          p.append(SAVE_PATH_ELEMENT_NAME)
          save_path = Path(
              params_helper.get_value_from_config(config, p)
          )
          new_save_path = (
              save_path.parent / TEMP_DIR_FOR_CV / save_path.name
          )
  
          dirs_for_saved_models.add(expand_path(new_save_path.parent))
  
          params_helper.insert_value_or_dict_into_config(
              config, p, str(new_save_path)
          )
  
      return config, dirs_for_saved_models
  
file_path: DeepPavlov/deeppavlov/core/common/cross_validation.py
imports: import shutil
  from collections import OrderedDict
  from logging import getLogger
  from pathlib import Path
  import numpy
  from sklearn.model_selection import KFold
  from deeppavlov.core.commands.train import train_evaluate_model_from_config, get_iterator_from_config, read_data_by_config
  from deeppavlov.core.commands.utils import expand_path, parse_config
  from deeppavlov.core.common.params_search import ParamsSearch
label_desc: Use image node_id 1 for calling a global function with example usage: change_savepath_for_model(config) and returns: config,  dirs_for_saved_models