code: def make_table(cm, pred_classes, true_classes, labels):
      data, count = [], 0
      for i, j in itertools.product(
          range(cm.shape[0]), range(cm.shape[1])
      ):
          if labels is not None and (
              isinstance(pred_classes[i], int)
              or isinstance(pred_classes[0], np.integer)
          ):
              pred = labels[pred_classes[i]]
              true = labels[true_classes[j]]
          else:
              pred = pred_classes[i]
              true = true_classes[j]
          data.append([pred, true, cm[i, j]])
          count += 1
          if utils.check_against_limit(
              count,
              "confusion_matrix",
              utils.chart_limit,
          ):
              break
  
      table = wandb.Table(
          columns=["Predicted", "Actual", "Count"], data=data
      )
  
      return table
  
file_path: wandb/wandb/sklearn/calculate/confusion_matrix.py
imports: import itertools
  from warnings import simplefilter
  import numpy
  from sklearn import metrics
  from sklearn.utils.multiclass import unique_labels
  import wandb
  from wandb.sklearn import utils
label_desc: Use image node_id 3 for calling a global function with example usage: make_table(cm, pred_classes, true_classes, labels) and returns: table