public static boolean callOnLibraryMethod(
    @NotNull PsiMethodCallExpression expression) {
    final PsiMethod method = expression.resolveMethod();
    return method instanceof PsiCompiledElement;
  }
public static boolean callOnLibraryMethod(
    @NotNull PsiMethodCallExpression expression)