/// <summary>
        ///     Expand the tree entry with the given name and ID
        /// </summary>
        /// <param name="entryName"></param>
        /// <returns></returns>
        internal bool ExpandTreeEntry(string entryName)
        {
            var dict  = PyWindow.Attribute("treeEntryByID").ToDictionary();
            var entry = dict.Where(d => (string)d.Key.ToList().First() == entryName);

            if (entry == null)
            {
                return(false);
            }
            if (entry.Count() != 1)
            {
                return(false);
            }

            entry.First().Value.Call("ExpandFromRoot");
            PyWindow.Call("RefreshTree");

            return(true);
        }
        /// <summary>
        ///     Close the tree entry with the given ID
        /// </summary>
        /// <param name="entryID"></param>
        /// <returns></returns>
        public bool CloseTreeEntry(long entryID)
        {
            var dict  = PyWindow.Attribute("treeEntryByID").ToDictionary();
            var entry = dict.Where(d => (long)d.Key.ToList().Last() == entryID);

            if (entry == null)
            {
                return(false);
            }
            if (entry.Count() != 1)
            {
                return(false);
            }


            //can NOT do threaded calls because these need to be executed in order
            PyWindow.Call("RemoveTreeEntry", entry.First().Value);
            PyWindow.Call("RefreshTree");
            return(true);
        }