code: def test_from_json():
      with tempfile.NamedTemporaryFile() as f:
          shutil.copyfile(DATAJSON, f.name)
          xtr = SupportMatrixExtractor("x", "22.02", f.name)
          xtr.from_json()
          print(f"{xtr.data}")
          assert "first" in xtr.data.keys()
          assert "one" in xtr.data["first"]
  
          xtr.get_from_env("SHELL", "first")
          assert "first" in xtr.data.keys()
          assert "one" in xtr.data["first"].keys()
          assert "x" in xtr.data.keys()
          assert "22.02" in xtr.data["x"]
  
      with tempfile.NamedTemporaryFile() as f:
          shutil.copyfile(DATAJSON, f.name)
          xtr = SupportMatrixExtractor("first", "one", f.name)
          xtr.from_json()
          print(f"{xtr.data}")
          assert "first" in xtr.data.keys()
          assert "one" in xtr.data["first"]
          assert xtr.data["first"]["one"] == "1"
          assert "two" in xtr.data["first"]
          assert xtr.data["first"]["two"] == "2"
  
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 9 for calling a global function with example usage: test_from_json() without return types