public IDNodeBase TrimNodes(IDNodeBase node)
        {
            int index = _list.IndexOf(node);

            while (index >= 0 && index < _list.Count - 1)
            {
                _list.RemoveAt(index);
                node.Clear();
                node = _list[index];
            }
            return(node);
        }