code: def ConsonniTodeschiniV_calc(TP, FP, FN, TN):
      """
      Calculate Consonni & Todeschini V similarity.
  
      :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: Consonni & Todeschini V similarity as float
      """
      try:
          n = TP + FP + FN + TN
          part1 = math.log(1 + TP * TN) - math.log(1 + FP * FN)
          part2 = math.log(1 + n * n / 4)
          return part1 / part2
      except Exception:
          return "None"
  
imports: from __future__ import division
  from enum import Enum
  import math
label_desc: Use image node_id 30 for calling a global function with example usage: ConsonniTodeschiniV_calc(TP, FP, FN, TN) and returns: unknown, str