code: def test_file_locks(monkeypatch, fs_type, options, file_lock_class):
      """Verify that the correct file lock type is used based on FS type and configuration"""
  
      def _get_fs(path):
          fs = _MockFS()
  
          choices = [
              str(uuid.uuid4()) for _ in range(random.randint(3, 10))
          ] + options
          random.shuffle(choices)
          fs.opts = ",".join(choices)
          fs.fstype = fs_type
          return fs
  
      monkeypatch.setattr(
          "orion.core.io.database.pickleddb._get_fs", _get_fs
      )
  
      assert isinstance(
          _create_lock("/whatever/the/path/is"), file_lock_class
      )
  
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 6 for calling a global function with example usage: test_file_locks(monkeypatch, fs_type, options, file_lock_class) and returns: fs