code: def test_serve_ticket(lock_store: LockStore):
      conversation_id = "my id 1"
  
      lock = lock_store.create_lock(conversation_id)
      lock_store.save_lock(lock)
  
      # issue ticket with long lifetime
      ticket_0 = lock_store.issue_ticket(conversation_id, 10)
      assert ticket_0 == 0
  
      lock = 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 = lock_store.issue_ticket(conversation_id, 10)
  
      # finish serving ticket_0
      lock_store.finish_serving(conversation_id, ticket_0)
  
      lock = 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
      lock_store.finish_serving(conversation_id, ticket_1)
  
      lock = lock_store.get_lock(conversation_id)
      assert not lock.is_someone_waiting()
  
imports: import asyncio
  import logging
  import sys
  import time
  from pathlib import Path
  from typing import Text
  from unittest.mock import Mock, patch
  import numpy
  import pytest
  import rasa.core.lock_store
  from _pytest.logging import LogCaptureFixture
  from _pytest.monkeypatch import MonkeyPatch
  from rasa.core.agent import Agent
  from rasa.core.channels import UserMessage
  from rasa.core.constants import DEFAULT_LOCK_LIFETIME
  from rasa.core.lock import TicketLock
  from rasa.core.lock_store import DEFAULT_REDIS_LOCK_STORE_KEY_PREFIX, InMemoryLockStore, LockError, LockStore, RedisLockStore
  from rasa.shared.constants import INTENT_MESSAGE_PREFIX
  from rasa.shared.exceptions import ConnectionException
  from rasa.utils.endpoints import EndpointConfig, read_endpoint_config
label_desc: Use image node_id 5 for calling a global function with example usage: test_serve_ticket(lock_store) without return types