Doc(Language.ANY, DocScope.ALL){
            """
                Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
                which are represented as integer values.
                For example, if labels = [0, 1, 1], predicted = [0, 2, 1], numClasses = 4, and weights = [1, 2, 3]