code: def test_serve_ticket(redis_lock_store: RedisLockStore):
      conversation_id = "my id 1"
  
      lock = redis_lock_store.create_lock(conversation_id)
      redis_lock_store.save_lock(lock)
  
      # issue ticket with long lifetime
      ticket_0 = redis_lock_store.issue_ticket(conversation_id, 10)
      assert ticket_0 == 0
  
      lock = redis_lock_store.get_lock(conversation_id)
      assert lock.last_issued == ticket_0
      assert lock.now_serving == ticket_0
      assert lock.is_someone_waiting()
  
      # issue another ticket
      ticket_1 = redis_lock_store.issue_ticket(conversation_id, 10)
  
      # finish serving ticket_0
      redis_lock_store.finish_serving(conversation_id, ticket_0)
  
      lock = redis_lock_store.get_lock(conversation_id)
  
      assert lock.last_issued == ticket_1
      assert lock.now_serving == ticket_1
      assert lock.is_someone_waiting()
  
      # serve second ticket and no one should be waiting
      redis_lock_store.finish_serving(conversation_id, ticket_1)
  
      lock = redis_lock_store.get_lock(conversation_id)
      assert not lock.is_someone_waiting()
  
file_path: rasa/tests/integration_tests/core/test_lock_store.py
imports: import asyncio
  import time
  from pathlib import Path
  import numpy
  import pytest
  from _pytest.monkeypatch import MonkeyPatch
  from rasa.core.agent import Agent
  from rasa.core.channels import UserMessage
  from rasa.shared.constants import INTENT_MESSAGE_PREFIX
  from rasa.core.lock_store import LockError, RedisLockStore
label_desc: Use image node_id 2 for calling a global function with example usage: test_serve_ticket(redis_lock_store) without return types