def METHOD_NAME(cls, process_instance_id: int) -> ProcessInstanceQueueModel | None:
    ctx = cls.get_thread_local_locking_context()
    return ctx["locks"].pop(process_instance_id, None)  # type: ignore