code: def test_json_serializer(tempdir, caplog):
      s = JsonSerializer()
      s.save({1: 5, 2: [3, 4]}, tempdir / "test.ckpt")
      assert (tempdir / "test.ckpt.json").exists()
      assert s.load(tempdir / "test.ckpt") == {"1": 5, "2": [3, 4]}
  
      with pytest.raises(FileNotFoundError, match="No file found"):
          s.load(tempdir / "test")
      assert "does not match" in caplog.text
  
file_path: nni/test/ut/nas/test_utils.py
imports: import tempfile
  import pytest
  from pathlib import Path
  import torch
  from nni.nas.utils import *
label_desc: Use image node_id 4 for calling a global function with example usage: test_json_serializer(tempdir, caplog) without return types