code: def plot_confusion_matrix(cm, title="Confusion Matrix"):
      """Plots a confusion matrix for each subject"""
      import matplotlib.pyplot as plt
      import math
  
      plt.figure()
      subjects = len(cm)
      root_subjects = math.sqrt(subjects)
      cols = math.ceil(root_subjects)
      rows = math.ceil(subjects / cols)
      classes = cm[0].shape[0]
      for subject in range(subjects):
          plt.subplot(rows, cols, subject + 1)
          plt.imshow(
              cm[subject], interpolation="nearest", cmap=plt.cm.bone
          )
          plt.xticks(np.arange(classes), range(1, classes + 1))
          plt.yticks(np.arange(classes), range(1, classes + 1))
          cbar = plt.colorbar(ticks=[0.0, 1.0], shrink=0.6)
          cbar.set_clim(0.0, 1.0)
          plt.xlabel("Predicted")
          plt.ylabel("True label")
          plt.title("{0:d}".format(subject + 1))
      plt.suptitle(title)
      plt.tight_layout()
      plt.show()
  
imports: import scipy.io
  from scipy.stats import stats
  from sklearn.metrics import confusion_matrix
  from sklearn.svm import NuSVC
  import numpy
  import brainiak.funcalign.srm
label_desc: Use image node_id 1 for calling a global function with example usage: plot_confusion_matrix(cm, title) without return types