code: def test_query_timeout(monkeypatch, orion_db):
      """Verify that filelock.Timeout is caught and reraised as DatabaseTimeout"""
      orion_db.timeout = 0.1
  
      def never_acquire(self, *arg, **kwargs):
          """Do not try to acquire, raise timeout"""
          raise Timeout(self)
  
      monkeypatch.setattr(FileLock, "acquire", never_acquire)
  
      with pytest.raises(DatabaseTimeout) as exc:
          orion_db.read("whatever", {"it should": "fail"})
  
      assert exc.match(
          "Could not acquire lock for PickledDB after 0.1 seconds."
      )
  
imports: import logging
  import random
  import uuid
  from multiprocessing import Pool
  import pytest
  from filelock import FileLock, SoftFileLock, Timeout
  from orion.core.io.database import DatabaseTimeout, DuplicateKeyError
  from orion.core.io.database.ephemeraldb import EphemeralCollection
  from orion.core.io.database.pickleddb import PickledDB, _create_lock, find_unpickable_doc, find_unpickable_field, local_file_systems
  from .test_database import get_db
label_desc: Use image node_id 5 for calling a global function with example usage: test_query_timeout(monkeypatch, orion_db) without return types