code: def __init__(self, json_path=None):
      self._idx2label = []
      self._idx2cls = []
      self._cls2label = {}
      self._cls2idx = {}
  
      json_path = json_path or os.path.join(
          os.path.dirname(__file__), "imagenet_class_index.json"
      )
  
      with open(os.path.abspath(json_path), "r") as read_file:
          class_json = json.load(read_file)
          self._idx2label = [
              class_json[str(k)][1] for k in range(len(class_json))
          ]
          self._idx2cls = [
              class_json[str(k)][0] for k in range(len(class_json))
          ]
          self._cls2label = {
              class_json[str(k)][0]: class_json[str(k)][1]
              for k in range(len(class_json))
          }
          self._cls2idx = {
              class_json[str(k)][0]: k for k in range(len(class_json))
          }
  
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 1 to create a new ImagenetLabels object  with example: obj = ImagenetLabels(json_path)