void (@NotNull Module module, @NotNull ModifiableRootModel model, @Nullable Library library) { final FacetManager facetManager = FacetManager.getInstance(module); ModifiableFacetModel facetModel = facetManager.createModifiableModel(); PythonFacet facet = facetManager.createFacet(PythonFacetType.getInstance(), "Python", null); facet.getConfiguration().setSdk(mySdkComboBox.getSelectedSdk()); facetModel.addFacet(facet); facetModel.commit(); }