public IEnumerable <PackageInfo> GetDependents(PackageInfo packageInfo)
        {
            var installedRoots   = LatestListPackages.Where(p => p.IsInstalled && p.Info.isDirectDependency);
            var dependsOnPackage = installedRoots.Where(p =>
                                                        p.Info.resolvedDependencies.Select(r => r.name).Contains(packageInfo.Name));

            return(dependsOnPackage);
        }
        /// <summary>
        /// We need no mark modules that are a dependency of any package/module as installed.
        /// This is how the module system currently behaves, so the UI needs to match this.
        /// </summary>
        private void MarkDependentModulesAsInstalled()
        {
            // Reset previous installed state
            foreach (var packageInfo in CompletePackageInfosList.Where(p => p.IsBuiltIn))
            {
                packageInfo.IsInstalledByDependency = false;
            }

            // Set dependent installed state
            var installedPackages = LatestListPackages.Where(p => p.IsInstalled);

            foreach (var package in installedPackages)
            {
                MarkModulesAsInstalled(package.DependentModules);
            }
        }