code: def overall_MCC_calc(classes, table, TOP, P):
      """
      Calculate Overall_MCC.
  
      :param classes: confusion matrix classes
      :type classes: list
      :param table: input confusion matrix
      :type table: dict
      :param TOP: number of positives in predict vector per class
      :type TOP: dict
      :param P: number of actual positives per class
      :type P: dict
      :return: Overall_MCC as float
      """
      try:
          cov_x_y = 0
          cov_x_x = 0
          cov_y_y = 0
          matrix_sum = sum(list(TOP.values()))
          for i in classes:
              cov_x_x += TOP[i] * (matrix_sum - TOP[i])
              cov_y_y += P[i] * (matrix_sum - P[i])
              cov_x_y += table[i][i] * matrix_sum - P[i] * TOP[i]
          return cov_x_y / (math.sqrt(cov_y_y * cov_x_x))
      except Exception:
          return "None"
  
imports: from __future__ import division
  import math
  import operator
  from functools import reduce
  from .pycm_interpret import *
  from .pycm_ci import kappa_SE_calc, CI_calc, SE_calc
  from .pycm_util import complement
label_desc: Use image node_id 13 for calling a global function with example usage: overall_MCC_calc(classes, table, TOP, P) and returns: unknown, str