code: def test_SphinxFileOutput(tmpdir):
      content = "Hello Sphinx World"
  
      # write test.txt at first
      filename = str(tmpdir / "test.txt")
      output = SphinxFileOutput(destination_path=filename)
      output.write(content)
      os.utime(filename, (0, 0))
  
      # overwrite it again
      output.write(content)
      assert os.stat(filename).st_mtime != 0  # updated
  
      # write test2.txt at first
      filename = str(tmpdir / "test2.txt")
      output = SphinxFileOutput(
          destination_path=filename, overwrite_if_changed=True
      )
      output.write(content)
      os.utime(filename, (0, 0))
  
      # overwrite it again
      output.write(content)
      assert os.stat(filename).st_mtime == 0  # not updated
  
      # overwrite it again (content changed)
      output.write(content + "; content change")
      assert os.stat(filename).st_mtime != 0
  
imports: import os
  from docutils import nodes
  from sphinx.util.docutils import SphinxFileOutput, SphinxTranslator, docutils_namespace, new_document, register_node
label_desc: Use image node_id 2 for calling a global function with example usage: test_SphinxFileOutput(tmpdir) without return types