@Nullable
 private static JpsFacetConfigurationSerializer<?> getModuleExtensionSerializer(
     @NotNull String typeId) {
   for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) {
     for (JpsFacetConfigurationSerializer<?> serializer :
         extension.getFacetConfigurationSerializers()) {
       if (serializer.getFacetTypeId().equals(typeId)) {
         return serializer;
       }
     }
   }
   return null;
 }
 public static void saveFacets(JpsModule module, @NotNull Element facetManagerElement) {
   FacetManagerState managerState = new FacetManagerState();
   for (JpsModelSerializerExtension extension : JpsModelSerializerExtension.getExtensions()) {
     for (JpsFacetConfigurationSerializer<?> serializer :
         extension.getFacetConfigurationSerializers()) {
       if (serializer.hasExtension(module)) {
         serializer.saveExtension(module, managerState.getFacets());
       }
     }
   }
   XmlSerializer.serializeInto(
       managerState, facetManagerElement, new SkipDefaultValuesSerializationFilters());
 }