@NotNull
  private static PsiMethod extractMethodForContent(@NotNull PsiClass pageOrModuleClass,
                                                   @NotNull String name,
                                                   @NotNull GrExpression invokedExpression,
                                                   @NotNull GrClosableBlock block) {
    GrLightMethodBuilder method = new GrLightMethodBuilder(pageOrModuleClass.getManager(), name) {
      @Override
      public PsiType getReturnType() {
        return block.getReturnType();
      }
    };
    method.setContainingClass(pageOrModuleClass);
    method.addModifier(GrModifierFlags.STATIC_MASK);
    method.setNavigationElement(invokedExpression);
    for (GrParameter parameter : block.getAllParameters()) {
      method.addParameter(parameter);
    }
    return method;
  }
@NotNull
  private static PsiMethod extractMethodForContent(@NotNull PsiClass pageOrModuleClass,
                                                   @NotNull String name,
                                                   @NotNull GrExpression invokedExpression,
                                                   @NotNull GrClosableBlock block)