boolean (@NotNull PyElement element, FQNamesProvider @NotNull ... namesProviders) { String name = element.getName(); if (name == null) { return false; } return Arrays.stream(namesProviders).anyMatch(o -> getLastComponents(o).contains(name)); }