public static void assertStatement(@Nullable PsiElement anchor, @NotNull PsiElement scope) {
    if (!(anchor instanceof GrStatement)) {
      LOG.error("cannot find anchor for variable", new Throwable(), AttachmentFactory.createContext(scope.getText()));
    }
  }
public static void assertStatement(@Nullable PsiElement anchor, @NotNull PsiElement scope)