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