code: def dInd_calc(TNR, TPR):
      """
      Calculate Distance index (dInd).
  
      :param TNR: specificity or true negative rate
      :type TNR: float
      :param TPR: sensitivity, recall, hit rate, or true positive rate
      :type TPR: float
      :return: dInd as float
      """
      try:
          result = math.sqrt(((1 - TNR) ** 2) + ((1 - TPR) ** 2))
          return result
      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 27 for calling a global function with example usage: dInd_calc(TNR, TPR) and returns: result, str