@Override
  public StructureViewTreeElement @NotNull [] getChildren() {
    final PyElement element = getValue();
    if (element == null) {
      return EMPTY_ARRAY;
    }

    final Collection<StructureViewTreeElement> children = new ArrayList<>();
    for (PyElement e : getElementChildren(element)) {
      children.add(createChild(e, getElementVisibility(e), false, elementIsField(e)));
    }
    PyPsiUtils.assertValid(element);
    if (element instanceof PyClass) {
      final TypeEvalContext context = TypeEvalContext.codeAnalysis(element.getProject(), element.getContainingFile());
      for (PyClass c : ((PyClass)element).getAncestorClasses(context)) {
        for (PyElement e : getElementChildren(c)) {
          final StructureViewTreeElement inherited = createChild(e, getElementVisibility(e), true, elementIsField(e));
          if (!children.contains(inherited)) {
            children.add(inherited);
          }
        }
      }
    }
    return children.toArray(StructureViewTreeElement.EMPTY_ARRAY);
  }
@Override
  public StructureViewTreeElement @NotNull [] getChildren()