code: def get_best_split(category, attr):
      cats = []
      for i in range(len(attr)):
          if not attr[i] == "?":
              cats.append([float(attr[i]), category[i]])
      cats = sorted(cats, key=lambda x: x[0])
  
      cat = [cats[i][1] for i in range(len(cats))]
      att = [cats[i][0] for i in range(len(cats))]
      gains = []
      split_point = []
      for i in range(1, len(cat)):
          if not att[i] == att[i - 1]:
              gains.append(
                  entropy(cat[:i]) * float(i) / len(cat)
                  + entropy(cat[i:]) * (1 - float(i) / len(cat))
              )
              split_point.append(i)
      return att[split_point[gains.index(min(gains))]]
  
file_path: imodels/imodels/tree/c45_tree/c45_utils.py
imports: import math
label_desc: Use image node_id 7 for calling a global function with example usage: get_best_split(category, attr) and returns: att