def __getitem__(self, name: str | int) -> InteractiveCommandClient:
        """Get the selected element of the currently selected object

        From the current command graph object, select the instance with the
        given name.

        Parameters
        ----------
        name: str
            The name, or index if it's of int type, of the item to resolve

        Return
        ------
        InteractiveCommandClient
            The current client, navigated to the specified command graph
            object.
        """
        if isinstance(self._current_node, CommandGraphRoot):
            raise KeyError("Root node has no available items", name, self._current_node.selectors)

        if not isinstance(self._current_node, CommandGraphObject):
            raise SelectError(
                "Unable to make selection on current node",
                str(name),
                self._current_node.selectors,
            )

        if self._current_node.selector is not None:
            raise SelectError("Selection already made", str(name), self._current_node.selectors)

        # check the selection is valid in the server-side qtile manager
        if not self._command.has_item(
            self._current_node.parent, self._current_node.object_type, name
        ):
            raise SelectError(
                "Item not available in object", str(name), self._current_node.selectors
            )

        next_node = self._current_node.parent.navigate(self._current_node.object_type, name)
        return self.__class__(self._command, current_node=next_node)
Get the selected element of the currently selected object

        From the current command graph object, select the instance with the
        given name.

        Parameters
        ----------
        name: str
            The name, or index if it's of int type, of the item to resolve

        Return
        ------
        InteractiveCommandClient
            The current client, navigated to the specified command graph
            object.
        
libqtile/command/client.py