code: def AGF_calc(TP, FP, FN, TN):
      """
      Calculate Adjusted F-score (AGF).
  
      :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: AGF as float
      """
      try:
          F2 = F_calc(TP=TP, FP=FP, FN=FN, beta=2)
          F05_inv = F_calc(TP=TN, FP=FN, FN=FP, beta=0.5)
          AGF = math.sqrt(F2 * F05_inv)
          return AGF
      except (TypeError, ValueError):
          return "None"
  
imports: from __future__ import division
  import math
  from .pycm_util import normal_quantile
  from .pycm_interpret import *
  from .pycm_param import CLASS_PARAMS
label_desc: Use image node_id 7 for calling a global function with example usage: AGF_calc(TP, FP, FN, TN) and returns: AGF, str