Return the start index of which the element is not in cmd tree.
        :type cmd_path: list or tuple
        :return: None if cmd_path already indexed in tree.

def index_in_tree(self, cmd_path):
        """
        Return the start index of which the element is not in cmd tree.
        :type cmd_path: list or tuple
        :return: None if cmd_path already indexed in tree.
        """
        current_tree = self.tree
        for key in cmd_path:
            if key in current_tree['children']:
                current_tree = current_tree['children'][key]
            else:
                return cmd_path.index(key)
        return None