PyConfigurableInterpreterList (@Nullable Project project) { final Project effectiveProject = project != null ? project : ProjectManager.getInstance().getDefaultProject(); final PyConfigurableInterpreterList instance = effectiveProject.getService(PyConfigurableInterpreterList.class); if (effectiveProject != project) { instance.disposeModel(); } return instance; }