Set<PyRequirement> (@NotNull PyPackageManager packageManager, @NotNull Module module) { final List<PyRequirement> requirements = getListedRequirements(packageManager, module); if (requirements == null) return null; if (requirements.isEmpty()) return Collections.emptySet(); final List<PyPackage> packages = packageManager.getPackages(); if (packages == null) return null; final Set<PyRequirement> result = new HashSet<>(requirements); result.addAll(getTransitiveRequirements(packages, requirements, new HashSet<>())); return result; }