Ref<PyType> (@NotNull PyCallable callable, @NotNull String typeText, @NotNull TypeEvalContext context) { final PyType type = PyTypeParser.getTypeByName(callable, typeText, context); if (type != null) { type.assertValid("from docstring"); } setTypeVarScopeOwners(type, callable, context); return Ref.create(type); }