private static int getLineSnippetTagBraceBalance(@NotNull String line) {
    int balance = 0;
    for (int i = 0; i < line.length(); i++) {
      var ch = line.charAt(i);
      if (ch == '}') {
        balance--;
      } else if (ch == '{') {
        balance++;
      }
    }
    return balance;
  }
private static int getLineSnippetTagBraceBalance(@NotNull String line)