private static PsiElement @NotNull [] trimBracesAndWhitespaces(@NotNull PsiCodeBlock codeBlock) {
    PsiElement[] elements = codeBlock.getChildren();
    int start = 1;
    while (start < elements.length && elements[start] instanceof PsiWhiteSpace) {
      start++;
    }
    int end = elements.length - 1;
    while (end > 0 && elements[end - 1] instanceof PsiWhiteSpace) {
      end--;
    }
    LOG.assertTrue(start < end, "wrapper block length is too small");
    return Arrays.copyOfRange(elements, start, end);
  }
private static PsiElement @NotNull [] trimBracesAndWhitespaces(@NotNull PsiCodeBlock codeBlock)