code: def test_to_json():
      with tempfile.NamedTemporaryFile() as f:
          xtr = SupportMatrixExtractor("x", "22.02", f.name)
          xtr.get_from_pip("pip")
          assert xtr.to_json() == r'{"x": {"22.02": {"pip": "22.0.4"}}}'
  
file_path: Merlin/docs/test_extractor.py
imports: import json
  import os
  import shutil
  import tempfile
  from pathlib import Path
  from extractor import SupportMatrixExtractor
label_desc: Use image node_id 8 for calling a global function with example usage: test_to_json() without return types