@Override
  @NotNull
  public Iterable<PyElement> iterateNames() {
    final List<PyElement> result = new ArrayList<>();
    final VariantsProcessor processor = new VariantsProcessor(this) {
      @Override
      protected void addElement(@NotNull String name, @NotNull PsiElement element) {
        element = PyUtil.turnDirIntoInit(element);
        if (element instanceof PyElement) {
          result.add((PyElement)element);
        }
      }
    };
    processor.setAllowedNames(getDunderAll());
    processDeclarations(processor, ResolveState.initial(), null, this);
    return result;
  }
@Override
  @NotNull
  public Iterable<PyElement> iterateNames()