code: def write_files(self, trained_model):
      fold = 0
      for train_index, test_index in trained_model:
          if self.dir_folds is not None:
              train_file = self.dir_folds + str(fold) + "/train.dat"
              test_file = self.dir_folds + str(fold) + "/test.dat"
  
              df_train = self.df.iloc[train_index]
              df_test = self.df.iloc[test_index]
  
              WriteFile(
                  train_file, sep=self.sep_write, mode=self.write_mode
              ).write_with_pandas(df_train.sort_values(by=[0, 1]))
              WriteFile(
                  test_file, sep=self.sep_write, mode=self.write_mode
              ).write_with_pandas(df_test.sort_values(by=[0, 1]))
  
              fold += 1
  
file_path: CaseRecommender/caserec/utils/split_database.py
imports: from sklearn.model_selection import KFold, ShuffleSplit
  import os
  from caserec.utils.process_data import ReadFile, WriteFile
label_desc: Use image node_id 3 for calling the SplitDatabase obj's underlying member method code with example usage: obj.write_files(trained_model) without return types