code: def test_open_reraise(tmpdir):
      fname = tmpdir.join("ha")
      with pytest.raises(AssertionError):
          aw = atomic_write(str(fname), overwrite=False)
          with aw:
              # Mess with internals, so commit will trigger a ValueError. We're
              # testing that the initial AssertionError triggered below is
              # propagated up the stack, not the second exception triggered
              # during commit.
              aw.rollback = lambda: 1 / 0
              # Now trigger our own exception.
              assert False, "Intentional failure for testing purposes"
  
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 5 for calling a global function with example usage: test_open_reraise(tmpdir) without return types