private void excludeAppKeys(@NonNull final ProvisionedMeshNode node, @NonNull final List<ApplicationKey> applicationKeys) {
        int index;
        for (Element element : node.getElements().values()) {
            for (MeshModel model : element.getMeshModels().values()) {
                final ListIterator<Integer> boundKeyIndexes = model.getBoundAppKeyIndexes().listIterator();
                while (boundKeyIndexes.hasNext()) {
                    index = boundKeyIndexes.next();
                    if (!isApplicationKeyBound(index, applicationKeys)) {
                        boundKeyIndexes.remove();
                        if (model.getPublicationSettings() != null && model.getPublicationSettings().getAppKeyIndex() == index) {
                            model.setPublicationSettings(null);
                        }
                    }

                }
            }
        }
    }
Exclude application keys that may be bound or used for publication by the models in the node that are not in the list.

@param node            Mesh node.
@param applicationKeys Selected Application keys.
mesh/src/main/java/no/nordicsemi/android/mesh/ImportExportUtils.java