public static Collection<PyTargetExpression> findClassAndInstanceAttributes(
    @NotNull String name,
    @NotNull Project project,
    GlobalSearchScope scope) {
    List<PyTargetExpression> ret = new ArrayList<>();
    StubIndex.getInstance().processElements(KEY, name, project, scope, PyClass.class, clazz -> {
      ProgressManager.checkCanceled();
      PyTargetExpression classAttr = clazz.findClassAttribute(name, false, null);
      if (classAttr != null) {
        ret.add(classAttr);
      }

      PyTargetExpression instAttr = clazz.findInstanceAttribute(name, false);
      if (instAttr != null){
        ret.add(instAttr);
      }

      return true;
    });
    return ret;
  }
public static Collection<PyTargetExpression> findClassAndInstanceAttributes(
    @NotNull String name,
    @NotNull Project project,
    GlobalSearchScope scope)