code: def _read_missing_references_json(json_path):
      """
      Convert from the JSON file to the form used internally by this
      extension.
  
      The JSON file is stored as ``{domain_type: {target: [locations,]}}``
      since JSON can't store dictionary keys which are tuples. We convert
      this back to ``{(domain_type, target):[locations]}`` for internal use.
  
      """
      with json_path.open("r") as stream:
          data = json.load(stream)
  
      ignored_references = {}
      for domain_type, targets in data.items():
          for target, locations in targets.items():
              ignored_references[(domain_type, target)] = locations
      return ignored_references
  
imports: from collections import defaultdict
  import json
  import logging
  from pathlib import Path
  from docutils.utils import get_source_line
  from docutils import nodes
  from sphinx.util import logging
  import matplotlib
label_desc: Use image node_id 8 for calling a global function with example usage: _read_missing_references_json(json_path) and returns: ignored_references