code: def test_already_present():
      # First test intentionally does not copy a data.json file.
      xtr = SupportMatrixExtractor("merlin-training", "22.02", "blah")
      assert xtr.already_present() is False
  
      with tempfile.NamedTemporaryFile() as f:
          shutil.copyfile(SAMPLEJSON, f.name)
          xtr = SupportMatrixExtractor(
              "merlin-training", "22.02", f.name
          )
          xtr.from_json()
          assert xtr.already_present() is True
  
      with tempfile.NamedTemporaryFile() as f:
          shutil.copyfile(SAMPLEJSON, f.name)
          xtr = SupportMatrixExtractor(
              "merlin-training", "22.02", f.name, force=True
          )
          xtr.from_json()
          assert xtr.already_present() is False
  
      with tempfile.NamedTemporaryFile() as f:
          shutil.copyfile(SAMPLEJSON, f.name)
          xtr = SupportMatrixExtractor("x", "22.02", f.name)
          xtr.from_json()
          assert xtr.already_present() is False
  
      with tempfile.NamedTemporaryFile() as f:
          shutil.copyfile(DATAJSON, f.name)
          xtr = SupportMatrixExtractor("x", "22.02", f.name)
          xtr.from_json()
          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"]
  
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 11 for calling a global function with example usage: test_already_present() without return types