code: def TI_calc(TP, FP, FN, alpha, beta):
      """
      Calculate Tversky index (TI).
  
      :param TP: true positive
      :type TP: int
      :param FP: false positive
      :type FP: int
      :param FN: false negative
      :type FN: int
      :param alpha: alpha coefficient
      :type alpha: float
      :param beta: beta coefficient
      :type beta: float
      :return: TI as float
      """
      try:
          TI = TP / (TP + alpha * FN + beta * FP)
          return TI
      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 3 for calling a global function with example usage: TI_calc(TP, FP, FN, alpha, beta) and returns: TI, str