def has_item(self, node: CommandGraphNode, object_type: str, item: str | int) -> bool:
        """Check if the given item exists

        Parameters
        ----------
        node: CommandGraphNode
            The node to check for items
        object_type: str
            The type of object to check for items.
        item: str
            The name or index of the item to check for

        Returns
        -------
        bool
            True if the item is resolved on the given node
        """
        try:
            self._command_object.select(node.selectors + [(object_type, item)])
        except SelectError:
            return False
        return True
Check if the given item exists

        Parameters
        ----------
        node: CommandGraphNode
            The node to check for items
        object_type: str
            The type of object to check for items.
        item: str
            The name or index of the item to check for

        Returns
        -------
        bool
            True if the item is resolved on the given node
        
libqtile/command/interface.py