TEST: covering all branches of compute_masked_class_stats functions