def __init__(self, scheduler):
    self.scheduler = scheduler
    self.locks = defaultdict(list)
    self.requests = {}
    self.requests_left = {}
    self.events = {}
    self.scheduler.handlers.update({'multi_lock_acquire': self.acquire, 'multi_lock_release': self.release})
def __init__(self, scheduler):
    self.scheduler = scheduler
    self.locks = defaultdict(list)
    self.requests = {}
    self.requests_left = {}
    self.events = {}
    self.scheduler.handlers.update({'multi_lock_acquire': self.acquire, 'multi_lock_release': self.release})