def release(self) -> None:
        """Closes the file descriptor to release the inhibitor."""
        if self.fd > 0:
            os.close(self.fd)
        else:
            logger.warning("No inhibitor available to release.")

        try:
            os.fstat(self.fd)
        except OSError:
            # File descriptor was successfully closed
            self.fd = -1
        else:
            # We could read the file descriptor so it's still open
            logger.warning("Unable to release inhibitor.")
Closes the file descriptor to release the inhibitor.
libqtile/resources/sleep.py