nodes: 0, module; 1, function_definition; 2, function_name:most_confused; 3, parameters; 4, type; 5, block; 6, identifier:self; 7, typed_default_parameter; 8, typed_default_parameter; 9, generic_type; 10, expression_statement; 11, expression_statement; 12, expression_statement; 13, expression_statement; 14, return_statement; 15, identifier:min_val; 16, type; 17, integer:1; 18, identifier:slice_size; 19, type; 20, integer:1; 21, identifier:Collection; 22, type_parameter; 23, string:"Sorted descending list of largest non-diagonal entries of confusion matrix, presented as actual, predicted, number of occurrences."; 24, assignment; 25, call; 26, assignment; 27, call; 28, identifier:int; 29, identifier:int; 30, type; 31, identifier:cm; 32, call; 33, attribute; 34, argument_list; 35, identifier:res; 36, list_comprehension; 37, identifier:sorted; 38, argument_list; 39, generic_type; 40, attribute; 41, argument_list; 42, identifier:np; 43, identifier:fill_diagonal; 44, identifier:cm; 45, integer:0; 46, tuple; 47, for_in_clause; 48, identifier:res; 49, keyword_argument; 50, keyword_argument; 51, identifier:Tuple; 52, type_parameter; 53, identifier:self; 54, identifier:confusion_matrix; 55, keyword_argument; 56, subscript; 57, subscript; 58, subscript; 59, pattern_list; 60, call; 61, identifier:key; 62, call; 63, identifier:reverse; 64, True; 65, type; 66, type; 67, type; 68, identifier:slice_size; 69, identifier:slice_size; 70, attribute; 71, identifier:i; 72, attribute; 73, identifier:j; 74, identifier:cm; 75, identifier:i; 76, identifier:j; 77, identifier:i; 78, identifier:j; 79, identifier:zip; 80, argument_list; 81, identifier:itemgetter; 82, argument_list; 83, identifier:str; 84, identifier:str; 85, identifier:int; 86, attribute; 87, identifier:classes; 88, attribute; 89, identifier:classes; 90, list_splat; 91, integer:2; 92, identifier:self; 93, identifier:data; 94, identifier:self; 95, identifier:data; 96, call; 97, attribute; 98, argument_list; 99, identifier:np; 100, identifier:where; 101, comparison_operator:cm>=min_val; 102, identifier:cm; 103, identifier:min_val
code: def most_confused(self, min_val:int=1, slice_size:int=1)->Collection[Tuple[str,str,int]]:
          "Sorted descending list of largest non-diagonal entries of confusion matrix, presented as actual, predicted, number of occurrences."
          cm = self.confusion_matrix(slice_size=slice_size)
          np.fill_diagonal(cm, 0)
          res = [(self.data.classes[i],self.data.classes[j],cm[i,j])
                  for i,j in zip(*np.where(cm>=min_val))]
          return sorted(res, key=itemgetter(2), reverse=True)