code: def load_json(json_path):
      """
      Loads a json config from a file.
      """
      assert os.path.exists(json_path), (
          "Json file %s not found" % json_path
      )
      json_file = open(json_path)
      json_config = json_file.read()
      json_file.close()
      try:
          config = json.loads(json_config)
      except BaseException as err:
          raise Exception(
              "Failed to validate config with error: %s" % str(err)
          )
  
      return config
  
imports: import collections.abc
  import contextlib
  import json
  import logging
  import os
  import time
  from functools import partial
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  import torch.nn
  from classy_vision.generic.distributed_util import broadcast_object, is_primary
  from fvcore.common.file_io import PathManager
label_desc: Use image node_id 22 for calling a global function with example usage: load_json(json_path) and returns: config