code: def GilbertWells_calc(TP, FP, FN, TN):
      """
      Calculate Gilbert & Wells 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: Gilbert & Wells similarity as float
      """
      try:
          n = TP + FP + FN + TN
          part1 = (TP + FP) * (TP + FN) * (TN + FP) * (TN + FN)
          part2 = (
              math.factorial(TP + FP)
              * math.factorial(TP + FN)
              * math.factorial(TN + FP)
              * math.factorial(TN + FN)
          )
          part3 = (
              math.factorial(n)
              * math.factorial(TP)
              * math.factorial(FP)
              * math.factorial(FN)
              * math.factorial(TN)
          )
          return math.log(
              (n**3) / (2 * math.pi * part1)
          ) + 2 * math.log(part3 / part2)
      except Exception:
          return "None"
  
imports: from __future__ import division
  from enum import Enum
  import math
label_desc: Use image node_id 42 for calling a global function with example usage: GilbertWells_calc(TP, FP, FN, TN) and returns: unknown, str