private static @Nullable Icon _getRawIcon(LookupElement item) {
    if (item instanceof LookupItem) {
      Icon icon = (Icon)((LookupItem<?>)item).getAttribute(LookupItem.ICON_ATTR);
      if (icon != null) return icon;
    }

    Object o = item.getObject();

    if (o instanceof Iconable && !(o instanceof PsiElement)) {
      return ((Iconable)o).getIcon(Registry.is("ide.completion.show.visibility.icon") ? Iconable.ICON_FLAG_VISIBILITY : 0);
    }

    final PsiElement element = item.getPsiElement();
    if (element != null && element.isValid()) {
      return element.getIcon(Registry.is("ide.completion.show.visibility.icon") ? Iconable.ICON_FLAG_VISIBILITY : 0);
    }
    return null;
  }
private static @Nullable Icon _getRawIcon(LookupElement item)