boolean (@NotNull PsiElement element) { final PsiFile file = element.getContainingFile(); if (file != null) { final PyPsiFacade facade = getPsiFacade(element); final VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile != null) { final String name = facade.findShortestImportableName(virtualFile, element); return name != null && (name.startsWith("numpy.") || name.startsWith("matplotlib.") || name.startsWith("scipy.")); } } return false; }