List<PyClassLikeType> (@NotNull PyClassPattern classPattern, @NotNull PyResolveContext resolveContext) { List<PsiElement> elements = PyUtil.multiResolveTopPriority(classPattern.getClassNameReference(), resolveContext); return StreamEx.of(elements) .select(PyClass.class) .map(e -> e.getType(resolveContext.getTypeEvalContext())) .nonNull() .map(PyInstantiableType::toInstance) .toList(); }