code: def test_rlock_acquire_release(tmpfile):
      lock = portalocker.RLock(tmpfile)
      lock2 = portalocker.RLock(tmpfile, fail_when_locked=False)
  
      lock.acquire()  # acquire lock when nobody is using it
      with pytest.raises(portalocker.LockException):
          # another party should not be able to acquire the lock
          lock2.acquire(timeout=0.01)
  
      # Now acquire again
      lock.acquire()
  
      lock.release()  # release the lock
      lock.release()
  
file_path: catboost/contrib/python/portalocker/py2/tests/tests.py
imports: from __future__ import print_function
  from __future__ import with_statement
  import pytest
  import portalocker
label_desc: Use image node_id 10 for calling a global function with example usage: test_rlock_acquire_release(tmpfile) without return types