class_docstr: Locking mechanism that issues tickets managing access to conversation IDs.
  
  Tickets are issued in the order in which they are requested. A detailed
  explanation of the ticket lock algorithm can be found at
  http://pages.cs.wisc.edu/~remzi/OSTEP/threads-locks.pdf#page=13
docstr: Issue a new ticket and return its number.
docstr_tok: ["Issue","a","new","ticket","and","return","its","number","."]
code: def issue_ticket(self, lifetime: float) -> int:
      """Issue a new ticket and return its number."""
      self.remove_expired_tickets()
      number = self.last_issued + 1
      ticket = Ticket(number, time.time() + lifetime)
      self.tickets.append(ticket)
  
      return number
  
imports: import json
  import logging
  from collections import deque
  import time
  from typing import Text, Optional, Union, Deque, Dict, Any
label_desc: Use image node_id 5 for calling the TicketLock obj's underlying member method code with example usage: obj.issue_ticket(lifetime) and returns: number