code: def Hamann_calc(TP, FP, FN, TN):
      """
      Calculate Hamann correlation.
  
      :param TP: true positive
      :type TP: int
      :param TN: true negative
      :type TN: int
      :param FP: false positive
      :type FP: int
      :param FN: false negative
      :type FN: int
      :return: Hamann correlation as float
      """
      try:
          n = TP + FP + FN + TN
  
          return (TP + TN - FP - FN) / n
      except Exception:
          return "None"
  
imports: from __future__ import division
  from enum import Enum
  import math
label_desc: Use image node_id 48 for calling a global function with example usage: Hamann_calc(TP, FP, FN, TN) and returns: unknown, str