code: def transform(
      self, bundle: DataBundle, for_inference: bool
  ) -> DataBundle:
      if (
          for_inference
          or bundle.y_train is None
          or bundle.x_valid is not None
      ):
          return bundle
      if not isinstance(bundle.x_train, np.ndarray):
          return bundle
  
      if self.num_split is None:
          num = 0.1
          default_min_split = 100
      else:
          num = self.num_split
          default_min_split = 0
      total = len(bundle.x_train)
      if isinstance(num, float):
          num = round(total * num)
      if num <= 0:
          return bundle
      min_split = (
          default_min_split
          if self.min_split is None
          else self.min_split
      )
      num = min(self.max_split, max(min_split, num))
      if num == min_split and num >= 0.5 * total:
          print_warning(
              f"`min_split` ({min_split}) exceeds "
              f"half of the total number of samples ({total}), "
              "so `SplitterBlock` will take no effects to "
              "ensure we have enought training samples."
          )
          return bundle
      kw = dict(
          order=self.order,
          shuffle=self.shuffle,
          verbose=self.is_local_rank_0,
      )
      splitter = DataSplitter(**kw)  # type: ignore
      fn = (
          splitter.split_clf
          if self.is_classification
          else splitter.split_reg
      )
      split = fn(bundle.x_train, bundle.y_train, num)  # type: ignore
      return DataBundle(*split.xy_remained, *split.xy)
  
imports: import numpy
  from enum import Enum
  from typing import Any
  from typing import Dict
  from typing import List
  from typing import Tuple
  from typing import Union
  from typing import Optional
  from typing import NamedTuple
  from dataclasses import dataclass
  from cftool.misc import print_warning
  from cftool.array import is_float
  from cftool.array import get_unique_indices
  from .recognizer import RecognizerBlock
  from ....schema import DataBundle
  from ....schema import ColumnTypes
  from ....schema import INoInitDataBlock
label_desc: Use image node_id 2 for calling the SplitterBlock obj's underlying member method code with example usage: obj.transform(bundle, for_inference) and returns: DataBundle, bundle, bundle, bundle, bundle