code: def test_replace_simultaneously_created_file(tmpdir):
      fname = tmpdir.join("ha")
      with atomic_write(str(fname), overwrite=True) as f:
          f.write("hoho")
          fname.write("harhar")
          assert fname.read() == "harhar"
      assert fname.read() == "hoho"
      assert len(tmpdir.listdir()) == 1
  
file_path: catboost/contrib/python/atomicwrites/py3/tests/test_atomicwrites.py
imports: import errno
  import os
  from atomicwrites import atomic_write
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: test_replace_simultaneously_created_file(tmpdir) without return types