code: def acquire(self, signal=True):
          
          if not self.needs_lock:
              return
          with self.synclock:
              while not self.lock.acquire(False):
                  self.synclock.wait()
              if signal:
                  self.acquired_event(self)
              self.synclock.notify_all()
docs: Locks the account.
          Method has no effect if the constructor argument `needs_lock`
          wsa set to False.
  
          :type signal: bool
          :param signal: Whether to emit the acquired_event signal.