code: def sparse_table_print(sparse_matrix):
      """
      Return printable confusion matrix in sparse mode.
  
      :param sparse_matrix: list of the sparse matrix and it's classes
      :type sparse_matrix: list
      :return: printable table as str
      """
      [sparse_table, actual_classes, predict_classes] = sparse_matrix
      predict_classes.sort()
      actual_classes.sort()
      classes_len = len(predict_classes)
      table_list = []
      for key in actual_classes:
          table_list.extend(list(sparse_table[key].values()))
      table_list.extend(predict_classes)
      table_max_length = max(map(len, map(str, table_list)))
      shift = "%-" + str(7 + table_max_length) + "s"
      result = (
          shift % "Predict"
          + shift * classes_len % tuple(map(str, predict_classes))
          + "\n"
      )
      result = result + "Actual\n"
      for key in actual_classes:
          row = [sparse_table[key][i] for i in predict_classes]
          result += (
              shift % str(key)
              + shift * classes_len % tuple(map(str, row))
              + "\n\n"
          )
      return result
  
imports: from __future__ import division
  from functools import partial
  from .pycm_param import *
  from .pycm_util import rounder, sort_char_num
  import webbrowser
label_desc: Use image node_id 11 for calling a global function with example usage: sparse_table_print(sparse_matrix) and returns: result