code: def F_calc(TP, FP, FN, beta):
      """
      Calculate F-score.
  
      :param TP: true positive
      :type TP: int
      :param FP: false positive
      :type FP: int
      :param FN: false negative
      :type FN: int
      :param beta: beta coefficient
      :type beta: float
      :return: F-score as float
      """
      try:
          result = ((1 + (beta) ** 2) * TP) / (
              (1 + (beta) ** 2) * TP + FP + (beta**2) * FN
          )
          return result
      except (ZeroDivisionError, TypeError):
          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 13 for calling a global function with example usage: F_calc(TP, FP, FN, beta) and returns: result, str