code: def test_compilelock_force_unlock():
      with tempfile.TemporaryDirectory() as dir_name:
          with lock_ctx(dir_name):
              dir_key = f"{dir_name}-{os.getpid()}"
  
              assert dir_key in local_mem._locks
              assert local_mem._locks[dir_key]
  
              force_unlock(dir_name)
  
              assert dir_key not in local_mem._locks
  
              # A sub-process forcing unlock...
              ctx = multiprocessing.get_context("spawn")
              p = ctx.Process(target=force_unlock, args=(dir_name,))
              p.start()
              p.join()
  
              assert dir_key not in local_mem._locks
  
file_path: pytensor/tests/compile/test_compilelock.py
imports: import multiprocessing
  import os
  import sys
  import tempfile
  import threading
  import time
  import filelock
  import pytest
  from pytensor.compile.compilelock import force_unlock, local_mem, lock_ctx
label_desc: Use image node_id 1 for calling a global function with example usage: test_compilelock_force_unlock() without return types