@NotNull
  private static Collection<? extends GrClosableBlock> findClosableBlocks(@NotNull final PsiElement element,
                                                                          final String @NotNull ... blockNames) {
    List<GrMethodCall> methodCalls = PsiTreeUtil.getChildrenOfTypeAsList(element, GrMethodCall.class);
    return ContainerUtil.mapNotNull(methodCalls, call -> {
      if (call == null || call.getClosureArguments().length != 1) return null;

      GrExpression expression = call.getInvokedExpression();
      return ArrayUtil.contains(expression.getText(), blockNames) ? call.getClosureArguments()[0] : null;
    });
  }
@NotNull
  private static Collection<? extends GrClosableBlock> findClosableBlocks(@NotNull final PsiElement element,
                                                                          final String @NotNull ... blockNames)