code: def fit(self, ctx: Context, train_data, validate_data=None):
      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:
          train_sid = None
          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_sid = None
              test_data_set = None
          else:
              test_sid = test_data_set.get_indexer(target="sample_id")
      else:
          validate_sid = None
          if validate_test_data_set.shape[0] == 0:
              test_data_set = None
              test_sid = None
          else:
              test_data_set = validate_test_data_set
              test_sid = validate_test_data_set.get_indexer(
                  target="sample_id"
              )
  
      if self.hetero_sync:
          ctx.hosts.put("train_data_sid", train_sid)
          ctx.hosts.put("validate_data_sid", validate_sid)
          ctx.hosts.put("test_data_sid", test_sid)
  
      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 DataSplitModuleGuest 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