code: def _get_lock_lifetime() -> int:
      return (
          int(os.environ.get("TICKET_LOCK_LIFETIME", 0))
          or DEFAULT_LOCK_LIFETIME
      )
  
imports: from __future__ import annotations
  import asyncio
  from contextlib import asynccontextmanager
  import json
  import logging
  import os
  from typing import AsyncGenerator, Dict, Optional, Text, Union
  from rasa.shared.exceptions import RasaException, ConnectionException
  import rasa.shared.utils.common
  from rasa.core.constants import DEFAULT_LOCK_LIFETIME
  from rasa.core.lock import TicketLock
  from rasa.utils.endpoints import EndpointConfig
label_desc: Use image node_id 1 for calling a global function with example usage: _get_lock_lifetime() and returns: unknown