code: def divide_on_feature(X, feature_i, threshold):
      """Divide dataset based on if sample value on feature index is larger than
      the given threshold"""
      split_func = None
      if isinstance(threshold, int) or isinstance(threshold, float):
          split_func = lambda sample: sample[feature_i] >= threshold
      else:
          split_func = lambda sample: sample[feature_i] == threshold
  
      X_1 = np.array([sample for sample in X if split_func(sample)])
      X_2 = np.array([sample for sample in X if not split_func(sample)])
  
      return np.array([X_1, X_2])
  
file_path: ML-From-Scratch/mlfromscratch/utils/data_manipulation.py
imports: from __future__ import division
  from itertools import combinations_with_replacement
  import numpy
  import math
  import sys
label_desc: Use image node_id 3 for calling a global function with example usage: divide_on_feature(X, feature_i, threshold) and returns: np