public void removeChildren(@NotNull Collection<? extends PackagingElement<?>> children) {
    this.update(
      () -> myChildren.removeAll(children),
      (builder, packagingElementEntity) -> {
        MutableExternalEntityMapping<PackagingElement<?>> mapping = builder.getMutableExternalMapping(PackagingExternalMapping.key);
        children.stream()
          .map(o -> mapping.getFirstEntity(o))
          .filter(Objects::nonNull)
          .forEach(o -> builder.removeEntity(o));
      }
    );
  }
public void removeChildren(@NotNull Collection<? extends PackagingElement<?>> children)