@Nullable
  private static MasterDetailsComponent.MyNode findFacetNode(final Facet facet, final MasterDetailsComponent.MyNode moduleNode) {
    for (int i = 0; i < moduleNode.getChildCount(); i++) {
      final TreeNode node = moduleNode.getChildAt(i);
      if (node instanceof MasterDetailsComponent.MyNode configNode &&
          configNode.getConfigurable() instanceof FacetConfigurable configurable) {
        final Facet<?> existingFacet = configurable.getEditableObject();
        if (existingFacet != null && existingFacet.equals(facet)) {
          return configNode;
        }
      }
    }

    return null;
  }
@Nullable
  private static MasterDetailsComponent.MyNode findFacetNode(final Facet facet, final MasterDetailsComponent.MyNode moduleNode)