class_docstr: Gini Impurity split criterion.
code: def compute_gini(dist, dist_sum_of_weights):
      gini = 1.0
      if dist_sum_of_weights != 0.0:
          for _, val in dist.items():
              rel_freq = val / dist_sum_of_weights
              gini -= rel_freq * rel_freq
      return gini
  
file_path: river/river/tree/split_criterion/gini_split_criterion.py
imports: from __future__ import annotations
  import math
  from .base import SplitCriterion
label_desc: Use image node_id 3 for calling the GiniSplitCriterion obj's underlying member method code with example usage: obj.compute_gini(dist, dist_sum_of_weights) and returns: gini