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: Get number of the ticket to be served next.
  
  Returns:
       Number of `Ticket` that is served next. 0 if no `Ticket` exists.
docstr_tok: ["Get","number","of","the","ticket","to","be","served","next",".","Returns",":","Number","of","`","Ticket","`","that","is","served","next",".","0","if","no","`","Ticket","`","exists","."]
code: def now_serving(self) -> Optional[int]:
      """Get number of the ticket to be served next.
  
      Returns:
           Number of `Ticket` that is served next. 0 if no `Ticket` exists.
      """
      return self._ticket_number_for(0) or 0
  
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 8 for calling the TicketLock obj's underlying member method code with example usage: obj.now_serving() and returns: unknown