def _get_depth_and_visual(self, desired_depth):
        """
        Returns a tuple of (depth, visual) for the requested
        depth.

        Falls back to the root depth and visual if the requested
        depth is unavailable.
        """
        if desired_depth in self._visuals:
            return desired_depth, self._visuals[desired_depth]

        logger.info(
            "%s bit colour depth not available. Falling back to root depth: %s.",
            desired_depth,
            self.root_depth,
        )
        return self.root_depth, self._visuals[self.root_depth]

        Returns a tuple of (depth, visual) for the requested
        depth.

        Falls back to the root depth and visual if the requested
        depth is unavailable.
        
libqtile/backend/x11/xcbq.py