PyType (@Nullable PyType elementType, @Nullable PyType returnType, @NotNull PsiElement anchor) { final PyClass generator = PyPsiFacade.getInstance(anchor.getProject()).createClassByQName(GENERATOR, anchor); return generator != null ? new PyCollectionTypeImpl(generator, false, Arrays.asList(elementType, null, returnType)) : null; }