code: def test_lock_timeout():
      lock = ReadWriteLock()
  
      result = lock.acquire_read()
      assert result is True
  
      result = lock.acquire_write(timeout=0.1)
      assert result is False
  
      # Timed out write does not prevent read
      with lock.read():
          pass
  
      lock.release_read()
      result = lock.acquire_write(timeout=0.1)
      assert result is True
  
      result = lock.acquire_read(timeout=0.1)
      assert result is False
  
      lock.release_write()
      result = lock.acquire_read(timeout=0.1)
      assert result is True
  
file_path: distributed/distributed/shuffle/tests/test_read_write_lock.py
imports: from __future__ import annotations
  import threading
  import pytest
  from distributed.shuffle._disk import ReadWriteLock
label_desc: Use image node_id 4 for calling a global function with example usage: test_lock_timeout() without return types