class_docstr: An extension for the scheduler to manage Locks
  
  This adds the following routes to the scheduler
  
  *  lock_acquire
  *  lock_release
class_docstr_tok: ["An","extension","for","the","scheduler","to","manage","Locks","This","adds","the","following","routes","to","the","scheduler","*","lock_acquire","*","lock_release"]
code: def __init__(self, scheduler):
      self.scheduler = scheduler
      self.events = defaultdict(deque)
      self.ids = dict()
  
      self.scheduler.handlers.update(
          {"lock_acquire": self.acquire, "lock_release": self.release}
      )
  
imports: from __future__ import annotations
  import asyncio
  import logging
  import uuid
  from collections import defaultdict, deque
  from dask.utils import parse_timedelta
  from distributed.utils import TimeoutError, log_errors, wait_for
  from distributed.worker import get_client
label_desc: Use image node_id 1 to create a new LockExtension object  with example: obj = LockExtension(scheduler)