def is_owned(self, shared=-1):
    self.__lock.acquire()
    try:
      return self.__is_owned(shared=shared)
    finally:
      self.__lock.release()

  #: Necessary to remain compatible with threading.Condition, which tries to
  #: retrieve a locks' "_is_owned" attribute
Is the current thread somehow owning the lock at this time?
dataset/ETHPy150Open ganeti/ganeti/lib/locking.py/SharedLock.is_owned