code: def lambda_B_calc(classes, table, TOP, POP):
      
      try:
          result = 0
          length = POP
          maxresponse = max(list(TOP.values()))
          for i in classes:
              result += max(list(table[i].values()))
          result = (result - maxresponse) / (length - maxresponse)
          return result
      except Exception:
          return "None"
docs: Calculate Goodman and Kruskal's lambda B.
  
      :param classes: confusion matrix classes
      :type classes : list
      :param table: confusion matrix table
      :type table : dict
      :param TOP: test outcome positive
      :type TOP : dict
      :param POP: population
      :type POP : int
      :return: Goodman and Kruskal's lambda B as float