code: def empty(self):
          
          self._lock.acquire()
          try:
              if self.closed:
                  raise LatchError()
              return len(self._queue) == 0
          finally:
              self._lock.release()
docs: Return :data:`True` if calling :meth:`get` would block.
  
          As with :class:`Queue.Queue`, :data:`True` may be returned even
          though a subsequent call to :meth:`get` will succeed, since a
          message may be posted at any moment between :meth:`empty` and
          :meth:`get`.
  
          As with :class:`Queue.Queue`, :data:`False` may be returned even
          though a subsequent call to :meth:`get` will block, since another
          waiting thread may be woken at any moment between :meth:`empty` and
          :meth:`get`.
  
          :raises LatchError:
              The latch has already been marked closed.