code: def calculate_confusion_matrix(predictions, ground_truth, classes):
      cm = np.zeros((len(classes), len(classes)))
      for index in range(
          min(predictions.shape[0], ground_truth.shape[0])
      ):
          cm[int(ground_truth[index]), int(predictions[index])] += 1
      return cm
  
imports: from __future__ import print_function
  import os
  import csv
  import glob
  import scipy
  import sklearn
  import numpy
  import hmmlearn.hmm
  import sklearn.cluster
  import pickle
  import matplotlib.pyplot
  from scipy.spatial import distance
  import sklearn.discriminant_analysis
  from sklearn.preprocessing import StandardScaler
  import sys
  import pyAudioAnalysis.audioBasicIO
  import pyAudioAnalysis.audioTrainTest
  import pyAudioAnalysis.MidTermFeatures
  import pyAudioAnalysis.ShortTermFeatures
label_desc: Use image node_id 15 for calling a global function with example usage: calculate_confusion_matrix(predictions, ground_truth, classes) and returns: cm