code: def get_split(self, k, repeat=0):
      try:
          train_index_file = os.path.join(
              self._results_path, "folds", f"fold_{k}_train_indices.npy"
          )
          validation_index_file = os.path.join(
              self._results_path,
              "folds",
              f"fold_{k}_validation_indices.npy",
          )
  
          train_index = np.load(train_index_file)
          validation_index = np.load(validation_index_file)
  
          X = load_data(self._X_path)
          y = load_data(self._y_path)
          y = y["target"]
  
          sample_weight = None
          if self._sample_weight_path is not None:
              sample_weight = load_data(self._sample_weight_path)
              sample_weight = sample_weight["sample_weight"]
  
          sensitive_features = None
          if self._sensitive_features_path is not None:
              sensitive_features = load_data(
                  self._sensitive_features_path
              )
  
          train_data = {
              "X": X.iloc[train_index],
              "y": y.iloc[train_index],
          }
          validation_data = {
              "X": X.iloc[validation_index],
              "y": y.iloc[validation_index],
          }
          if sample_weight is not None:
              train_data["sample_weight"] = sample_weight.iloc[
                  train_index
              ]
              validation_data["sample_weight"] = sample_weight.iloc[
                  validation_index
              ]
          if sensitive_features is not None:
              train_data[
                  "sensitive_features"
              ] = sensitive_features.iloc[train_index]
              validation_data[
                  "sensitive_features"
              ] = sensitive_features.iloc[validation_index]
  
      except Exception as e:
          import traceback
  
          print(traceback.format_exc())
          raise AutoMLException(
              "Problem with custom validation. " + str(e)
          )
      return (train_data, validation_data)
  
file_path: mljar-supervised/supervised/validation/validator_custom.py
imports: import gc
  import logging
  import os
  import warnings
  import joblib
  import numpy
  import pandas
  import time
  from sklearn.model_selection import KFold, StratifiedKFold
  from supervised.exceptions import AutoMLException
  from supervised.utils.config import mem
  from supervised.utils.utils import load_data
  from supervised.validation.validator_base import BaseValidator
label_desc: Use image node_id 2 for calling the CustomValidator obj's underlying member method code with example usage: obj.get_split(k, repeat) and returns: train_data,  validation_data