private static int getPriority(LookupElement element) {
    PsiMethod method = Objects.requireNonNull(getItemMethod(element));
    return (PsiTypes.voidType().equals(method.getReturnType()) ? 0 : 1) +
           (method.getParameterList().isEmpty() ? 0 : 2);
  }
private static int getPriority(LookupElement element)