private static void ensureValidResults(@NotNull ResolveResult @NotNull [] result) {
    for (ResolveResult resolveResult : result) {
      ensureValidPsi(resolveResult);
    }
  }
private static void ensureValidResults(@NotNull ResolveResult @NotNull [] result)