private static @NotNull List<SetupTask> getTaskList(@NotNull Module module, boolean setuptools) {
    final QualifiedName name = QualifiedName.fromDottedString((setuptools ? "setuptools" : "distutils") + ".command.install.install");
    final PsiElement install = PyResolveImportUtil.resolveTopLevelMember(name, PyResolveImportUtil.fromModule(module));

    if (install instanceof PyClass) {
      final PsiDirectory commandDir = install.getContainingFile().getParent();
      if (commandDir != null) {
        final Map<String, List<SetupTask>> cache = setuptools ? ourSetuptoolsTaskCache : ourDistutilsTaskCache;
        final String path = commandDir.getVirtualFile().getPath();

        List<SetupTask> tasks = cache.get(path);
        if (tasks == null) {
          tasks = collectTasks(module, commandDir, setuptools);
          cache.put(path, tasks);
        }
        return tasks;
      }
    }

    return Collections.emptyList();
  }
private static @NotNull List<SetupTask> getTaskList(@NotNull Module module, boolean setuptools)