Release lock.

        To release a lock, we must already own the lock.

        Arguments:
            force (bool, optional): If true, ignore any existing lock owner.

        Raises:
            UnableToReleaseLockError: If the lock is claimed by another
              process (not raised if force option is used).

def release(self, force=False):
        """
        Release lock.

        To release a lock, we must already own the lock.

        Arguments:
            force (bool, optional): If true, ignore any existing lock owner.

        Raises:
            UnableToReleaseLockError: If the lock is claimed by another
              process (not raised if force option is used).
        """
        # There's no lock, so do nothing.
        if not self.islocked:
            return

        if self.owned_by_self or force:
            os.remove(self.path)
        else:
            raise UnableToReleaseLockError(self)