code: def __init__(self, value: int):
      self.max = value
      self.value = value
      self.events = SortedKeyList(key=lambda x: x[0])
  
file_path: hail/hail/python/hailtop/aiotools/weighted_semaphore.py
imports: from typing import Optional, Type
  from sortedcontainers import SortedKeyList
  from types import TracebackType
  import asyncio
label_desc: Use image node_id 1 to create a new WeightedSemaphore object  with example: obj = WeightedSemaphore(value)