boolean (@NotNull PyFunction function) { final String name = function.getName(); if (PyNames.CLASS_GETITEM.equals(name)) return true; if (PyNames.GETITEM.equals(name)) { final PyClass cls = function.getContainingClass(); if (cls != null) { final String qualifiedName = cls.getQualifiedName(); return SPECIAL_FORM.equals(qualifiedName) || SPECIAL_FORM_EXT.equals(qualifiedName); } } return false; }