code: def test_issue_ticket():
      lock = TicketLock("random id 0")
  
      # no lock issued
      assert lock.last_issued == -1
      assert lock.now_serving == 0
  
      # no one is waiting
      assert not lock.is_someone_waiting()
  
      # issue ticket
      ticket = lock.issue_ticket(1)
      assert ticket == 0
      assert lock.last_issued == 0
      assert lock.now_serving == 0
  
      # someone is waiting
      assert 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 1 for calling a global function with example usage: test_issue_ticket() without return types