public boolean containsModule(@NotNull Module module) {
    return switch (myType) {
      case PROJECT -> true;
      case MODULE -> myModule == module;
      case MODULES -> myModules.contains(module);
      case CUSTOM -> {
        if (module.isDisposed()) yield false;
        for (VirtualFile file : ModuleRootManager.getInstance(module).getSourceRoots()) {
          if (myScope.contains(file)) yield true;
        }
        yield false;
      }
      default -> false;
    };
  }
public boolean containsModule(@NotNull Module module)