code: def test_mixed_serializer(tempdir, caplog):
      s = TorchSerializer()
      s.save(1, tempdir / "test.ckpt")
  
      s = JsonSerializer()
      with pytest.raises(FileNotFoundError, match="No file found"):
          s.load(tempdir / "test.ckpt")
  
      assert "which could be loaded" in caplog.text
  
      s.save(2, tempdir / "test.ckpt")
      assert s.load(tempdir / "test.ckpt") == 2
  
      assert TorchSerializer().load(tempdir / "test.ckpt") == 1
  
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 5 for calling a global function with example usage: test_mixed_serializer(tempdir, caplog) without return types