code: def probabilities2classes(probs, topk=5):
      labels = get_imagenet_labels()
      top_probs = probs.topk(topk)
      # return (probability, class_id, class_label, class_code)
      return tuple(
          (p, c, labels.index2label_text(c), labels.index2label_code(c))
          for p, c in zip(
              top_probs[0][0].data.cpu().numpy(),
              top_probs[1][0].data.cpu().numpy(),
          )
      )
  
file_path: tensorwatch/tensorwatch/imagenet_utils.py
imports: from torchvision import transforms
  from .None import pytorch_utils
  import json, os
label_desc: Use image node_id 7 for calling a global function with example usage: probabilities2classes(probs, topk) and returns: tuple