code: def fit(self, ctx: Context, train_data, validate_data=None):
      if self.hetero_sync:
          train_data_sid = ctx.guest.get("train_data_sid")
          validate_data_sid = ctx.guest.get("validate_data_sid")
          test_data_sid = ctx.guest.get("test_data_sid")
          train_data_set, validate_data_set, test_data_set = (
              None,
              None,
              None,
          )
          if train_data_sid:
              train_data_set = train_data.loc(
                  train_data_sid, preserve_order=True
              )
          if validate_data_sid:
              validate_data_set = train_data.loc(
                  validate_data_sid, preserve_order=True
              )
          if test_data_sid:
              test_data_set = train_data.loc(
                  test_data_sid, preserve_order=True
              )
      else:
          data_count = train_data.shape[0]
          train_size, validate_size, test_size = get_split_data_size(
              self.train_size,
              self.validate_size,
              self.test_size,
              data_count,
          )
  
          if self.stratified:
              (
                  train_data_set,
                  train_sample_n_per_label,
                  labels,
              ) = sample_per_label(
                  train_data,
                  sample_count=train_size,
                  random_state=self.random_state,
              )
              if len(train_sample_n_per_label) == 0:
                  train_sample_n_per_label = {
                      label: 0 for label in labels
                  }
          else:
              train_data_set = sample_data(
                  df=train_data,
                  n=train_size,
                  random_state=self.random_state,
              )
          if train_data_set is not None:
              # train_sid = train_data_set.get_indexer(target="sample_id")
              validate_test_data_set = train_data.drop(train_data_set)
          else:
              validate_test_data_set = train_data
  
          if self.stratified:
              (
                  validate_data_set,
                  valid_sample_n_per_label,
                  _,
              ) = sample_per_label(
                  validate_test_data_set,
                  sample_count=validate_size,
                  random_state=self.random_state,
              )
              if len(valid_sample_n_per_label) == 0:
                  valid_sample_n_per_label = {
                      label: 0 for label in labels
                  }
          else:
              validate_data_set = sample_data(
                  df=validate_test_data_set,
                  n=validate_size,
                  random_state=self.random_state,
              )
          if validate_data_set is not None:
              # validate_sid = validate_data_set.get_indexer(target="sample_id")
              test_data_set = validate_test_data_set.drop(
                  validate_data_set
              )
              if test_data_set.shape[0] == 0:
                  test_data_set = None
          else:
              if validate_test_data_set.shape[0] == 0:
                  test_data_set = None
              else:
                  test_data_set = validate_test_data_set
          if self.stratified:
              if test_data_set:
                  test_sample_n_per_label = {}
                  for label in labels:
                      test_sample_n_per_label[label] = int(
                          (test_data_set.label == label).sum().values[0]
                      )
              else:
                  test_sample_n_per_label = {
                      label: 0 for label in labels
                  }
              for label in labels:
                  label_summary = {}
                  label_summary["original_count"] = int(
                      (train_data.label == label).sum().values[0]
                  )
                  label_summary[
                      "train_count"
                  ] = train_sample_n_per_label[label]
                  label_summary[
                      "validate_count"
                  ] = valid_sample_n_per_label[label]
                  label_summary["test_count"] = test_sample_n_per_label[
                      label
                  ]
  
                  ctx.metrics.log_metrics(
                      label_summary,
                      name=f"{label}_summary",
                      type="data_split",
                  )
  
      return train_data_set, validate_data_set, test_data_set
  
file_path: FATE/python/fate/ml/model_selection/data_split.py
imports: import logging
  from fate.arch import Context
  from fate.arch.dataframe import DataFrame
  from ..abc.module import Module
label_desc: Use image node_id 2 for calling the DataSplitModuleHost obj's underlying member method code with example usage: obj.fit(ctx, train_data, validate_data) and returns: train_data_set,  validate_data_set,  test_data_set