code: def test_json(tmpdir):
      # Simple roundtrip test of json files, just a sanity check.
      adict = dict(a="one", c="three", b="two")
      name = tmpdir.join("test.json").strpath
      save_json(name, adict)  # save_json closes the file
      new_dict = load_json(name)
      os.unlink(name)
      assert sorted(adict.items()) == sorted(new_dict.items())
  
imports: import os
  import time
  from pathlib import Path
  from unittest import mock, SkipTest
  import pytest
  from ...testing import TempFATFS
  from ...utils.filemanip import save_json, load_json, fname_presuffix, fnames_presuffix, hash_rename, check_forhash, _parse_mount_table, _cifs_table, on_cifs, copyfile, copyfiles, ensure_list, simplify_list, check_depends, split_filename, get_related_files, indirectory, loadpkl, loadcrash, savepkl, path_resolve, write_rst_list, emptydirs
label_desc: Use image node_id 20 for calling a global function with example usage: test_json(tmpdir) without return types