async def _take(self) -> None:
        """Sends the request to dbus to create an inhibitor."""
        # The "Inhibit" method returns a file descriptor
        self.fd = await self.login.call_inhibit(
            "sleep",  # what: The lock type. We only want to inhibit sleep
            "qtile",  # who: Name of program requesting inhibitor
            "Run hooked functions before suspend",  # why: Short description of purpose
            "delay",  # mode: "delay" or "block"
        )

        # We need to set CLOEXEC flag for the file descriptor
        # See: https://github.com/qtile/qtile/pull/4388#issuecomment-1675410090
        # for explanation
        flags = fcntl.fcntl(self.fd, fcntl.F_GETFD)
        fcntl.fcntl(self.fd, fcntl.F_SETFD, flags | fcntl.FD_CLOEXEC)
Sends the request to dbus to create an inhibitor.
libqtile/resources/sleep.py