code: def RR_calc(classes, TOP):
      """
      Calculate Global performance index (RR).
  
      :param classes: confusion matrix classes
      :type classes: list
      :param TOP: number of positives in predict vector per class
      :type TOP: dict
      :return: RR as float
      """
      try:
          class_number = len(classes)
          result = sum(list(TOP.values()))
          return result / class_number
      except Exception:
          return "None"
  
imports: from __future__ import division
  import math
  import operator
  from functools import reduce
  from .pycm_interpret import *
  from .pycm_ci import kappa_SE_calc, CI_calc, SE_calc
  from .pycm_util import complement
label_desc: Use image node_id 12 for calling a global function with example usage: RR_calc(classes, TOP) and returns: unknown, str