code: def test_temporary_save_path(
      tmp_path: Path, existing_content: Optional[str]
  ) -> None:
      filepath = tmp_path / "save_and_move_test.txt"
      if existing_content:
          filepath.write_text(existing_content)
      with utils.temporary_save_path(filepath) as tmp:
          assert str(tmp).endswith(".txt.save_tmp")
          tmp.write_text("12")
          if existing_content:
              assert filepath.read_text() == existing_content
      assert filepath.read_text() == "12"
  
file_path: submitit/submitit/core/test_utils.py
imports: import os
  import shutil
  import sys
  from pathlib import Path
  from typing import Optional
  import pytest
  from .None import utils
label_desc: Use image node_id 1 for calling a global function with example usage: test_temporary_save_path(tmp_path, existing_content) without return types