code: def load_data_json(json_path, replacements={}):
      """Loads JSON and recursively formats string values.
  
      Arguments
      ----------
      json_path : str
          Path to CSV file.
      replacements : dict
          (Optional dict), e.g., {"data_folder": "/home/speechbrain/data"}.
          This is used to recursively format all string values in the data.
  
      Returns
      -------
      dict
          JSON data with replacements applied.
  
      Example
      -------
      >>> json_spec = '''{
      ...   "ex1": {"files": ["{ROOT}/mic1/ex1.wav", "{ROOT}/mic2/ex1.wav"], "id": 1},
      ...   "ex2": {"files": [{"spk1": "{ROOT}/ex2.wav"}, {"spk2": "{ROOT}/ex2.wav"}], "id": 2}
      ... }
      ... '''
      >>> tmpfile = getfixture('tmpdir') / "test.json"
      >>> with open(tmpfile, "w") as fo:
      ...     _ = fo.write(json_spec)
      >>> data = load_data_json(tmpfile, {"ROOT": "/home"})
      >>> data["ex1"]["files"][0]
      '/home/mic1/ex1.wav'
      >>> data["ex2"]["files"][1]["spk2"]
      '/home/ex2.wav'
  
      """
      with open(json_path, "r") as f:
          out_json = json.load(f)
      _recursive_format(out_json, replacements)
      return out_json
  
imports: import os
  import torch
  import logging
  import numpy
  import pickle
  import hashlib
  import csv
  import time
  import torchaudio
  import json
  import re
  from speechbrain.utils.torch_audio_backend import check_torchaudio_backend
label_desc: Use image node_id 1 for calling a global function with example usage: load_data_json(json_path, replacements) and returns: out_json