code: def test_acquire_release(tmpfile):
      lock = portalocker.Lock(tmpfile)
      lock2 = portalocker.Lock(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)
  
          # re-acquire a held lock is a no-op
          lock.acquire()
  
      lock.release()  # release the lock
      lock.release()
  
imports: from __future__ import print_function
  from __future__ import with_statement
  import os
  import dataclasses
  import multiprocessing
  import time
  import typing
  import pytest
  import portalocker
  from portalocker import utils
  from portalocker import LockFlags
label_desc: Use image node_id 9 for calling a global function with example usage: test_acquire_release(tmpfile) without return types