private static @Nullable Language deriveLanguage(@NotNull Block block) {
    if (block instanceof BlockEx) {
      return ((BlockEx)block).getLanguage();
    }
    return null;
  }
private static @Nullable Language deriveLanguage(@NotNull Block block)