boolean (@NotNull PsiElement anchor, @NotNull final String typeString) { for (String typeName : getNumpyUnionType(typeString)) { if (anchor instanceof PyFunction && isInsideNumPy(anchor) && NumpyUfuncs.isUFunc(((PyFunction)anchor).getName()) && ("array_like".equals(typeName) || "ndarray".equals(typeName))) { return true; } } return false; }