code: def stat_print(
      classes,
      class_stat,
      overall_stat,
      digit=5,
      overall_param=None,
      class_param=None,
  ):
      """
      Return printable statistics table.
  
      :param classes: confusion matrix classes
      :type classes: list
      :param class_stat: statistic result for each class
      :type class_stat: dict
      :param overall_stat: overall statistic result
      :type overall_stat:dict
      :param digit: scale (number of fraction digits)(default value: 5)
      :type digit: int
      :param overall_param: overall parameters list for print, Example: ["Kappa", "Scott PI"]
      :type overall_param: list
      :param class_param: class parameters list for print, Example: ["TPR", "TNR", "AUC"]
      :type class_param: list
      :return: printable result as str
      """
      shift = max(map(len, PARAMS_DESCRIPTION.values())) + 5
      classes_len = len(classes)
      overall_stat_keys = sort_char_num(overall_stat.keys())
      result = ""
      if isinstance(overall_param, list):
          if set(overall_param) <= set(overall_stat_keys):
              overall_stat_keys = sort_char_num(overall_param)
      if len(overall_stat_keys) > 0:
          result = "Overall Statistics : " + "\n\n"
          for key in overall_stat_keys:
              result += (
                  key
                  + " " * (shift - len(key) + 7)
                  + rounder(overall_stat[key], digit)
                  + "\n"
              )
      class_stat_keys = sorted(class_stat.keys())
      if isinstance(class_param, list):
          if set(class_param) <= set(class_stat_keys):
              class_stat_keys = sorted(class_param)
      if len(class_stat_keys) > 0 and len(classes) > 0:
          class_shift = max(
              max(map(lambda x: len(str(x)), classes)) + 5,
              digit + 6,
              14,
          )
          class_shift_format = "%-" + str(class_shift) + "s"
          result += "\nClass Statistics :\n\n"
          result += (
              "Classes"
              + shift * " "
              + class_shift_format
              * classes_len
              % tuple(map(str, classes))
              + "\n"
          )
          rounder_map = partial(rounder, digit=digit)
          for key in class_stat_keys:
              row = [class_stat[key][i] for i in classes]
              params_text = PARAMS_DESCRIPTION[key]
              if key not in CAPITALIZE_FILTER:
                  params_text = params_text.capitalize()
              result += (
                  key
                  + "("
                  + params_text
                  + ")"
                  + " "
                  * (
                      shift
                      - len(key)
                      - len(PARAMS_DESCRIPTION[key])
                      + 5
                  )
                  + class_shift_format
                  * classes_len
                  % tuple(map(rounder_map, row))
                  + "\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 14 for calling a global function with example usage: stat_print(classes, class_stat, overall_stat, digit, overall_param, class_param) and returns: result