code: def test_dont_remove_simultaneously_created_file(tmpdir):
      fname = tmpdir.join("ha")
      with pytest.raises(OSError) as excinfo:
          with atomic_write(str(fname), overwrite=False) as f:
              f.write("hoho")
              fname.write("harhar")
              assert fname.read() == "harhar"
  
      assert excinfo.value.errno == errno.EEXIST
      assert fname.read() == "harhar"
      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 4 for calling a global function with example usage: test_dont_remove_simultaneously_created_file(tmpdir) without return types