code: def timeout(delay: Optional[float]) -> Timeout:
      """Timeout async context manager.
  
      Useful in cases when you want to apply timeout logic around block
      of code or in cases when asyncio.wait_for is not suitable. For example:
  
      >>> async with asyncio.timeout(10):  # 10 seconds timeout
      ...     await long_running_task()
  
  
      delay - value in seconds or None to disable timeout logic
  
      long_running_task() is interrupted by raising asyncio.CancelledError,
      the top-most affected timeout() context manager converts CancelledError
      into TimeoutError.
      """
      loop = events.get_running_loop()
      return Timeout(loop.time() + delay if delay is not None else None)
  
file_path: catboost/contrib/tools/python3/src/Lib/asyncio/timeouts.py
imports: import enum
  from types import TracebackType
  from typing import final, Optional, Type
  from .None import events
  from .None import exceptions
  from .None import tasks
label_desc: Use image node_id 1 for calling a global function with example usage: timeout(delay) and returns: Timeout