code: def calc_pr(y_i, x, y, b):
      idx = np.argwhere((y == y_i) == b)
      ct = x[idx[:, 0]].sum(0) + 1
      tot = ((y == y_i) == b).sum() + 1
      return ct / tot
  
file_path: ktrain/ktrain/text/models.py
imports: from ..None import utils
  from ..imports import *
  from .None import preprocessor
label_desc: Use image node_id 3 for calling a global function with example usage: calc_pr(y_i, x, y, b) and returns: unknown