def criteria_proxy(l_weight, l_length, r_weight, r_length, not_repeated):
    """
    Maximizing the MSE or Gini gain is equivalent to minimizing
    this proxy function.
    """
    return -(l_weight / l_length + r_weight / r_length) * not_repeated