code: def test_reuse_resources_overwrites():
      """
      Test that the REUSE_RESOURCES method does *not* overwrite an existing resources.json
      """
      with tempfile.TemporaryDirectory(
          dir=TEST_WORKING_DIR
      ) as test_dir:
          pipe = stanza.Pipeline(
              "en",
              download_method=core.DownloadMethod.REUSE_RESOURCES,
              model_dir=test_dir,
              processors="tokenize",
              package={"tokenize": "combined"},
          )
  
          assert sorted(os.listdir(test_dir)) == [
              "en",
              "resources.json",
          ]
          resources_path = os.path.join(test_dir, "resources.json")
          mod_time = os.path.getmtime(resources_path)
  
          pipe = stanza.Pipeline(
              "en",
              download_method=core.DownloadMethod.REUSE_RESOURCES,
              model_dir=test_dir,
              processors="tokenize",
              package={"tokenize": "combined"},
          )
          new_mod_time = os.path.getmtime(resources_path)
          assert mod_time == new_mod_time
  
imports: import pytest
  import shutil
  import tempfile
  import stanza
  from stanza.tests import *
  from stanza.pipeline import core
  from stanza.resources.common import get_md5, load_resources_json
label_desc: Use image node_id 5 for calling a global function with example usage: test_reuse_resources_overwrites() without return types