def METHOD_NAME(
    self,
    app: Flask,
    with_db_and_bpmn_file_cleanup: None,
) -> None:
    process_instance = self._create_process_instance()
    assert not ProcessInstanceLockService.has_lock(process_instance.id)
    with ProcessInstanceQueueService.dequeued(process_instance):
        assert ProcessInstanceLockService.has_lock(process_instance.id)
    assert not ProcessInstanceLockService.has_lock(process_instance.id)