protected void addChildren(final @NotNull XCompositeNode node, final @Nullable XValueChildrenList children) {
    if (children == null) {
      node.addChildren(XValueChildrenList.EMPTY, true);
      return;
    }
    final PyDebuggerSettings debuggerSettings = PyDebuggerSettings.getInstance();
    final XValueChildrenList filteredChildren = new XValueChildrenList();
    boolean isReturnEmpty = true;
    boolean isSpecialEmpty = true;

    for (int i = 0; i < children.size(); i++) {
      XValue value = children.getValue(i);
      String name = children.getName(i);
      if (value instanceof PyDebugValue pyValue) {

        restoreValueDescriptor(pyValue);

        if (name.equals(ProtocolParser.DUMMY_RET_VAL) && debuggerSettings.isWatchReturnValues()) {
          isReturnEmpty = false;
        }
        else if (!debuggerSettings.isSimplifiedView()) {
          if (ProtocolParser.HIDDEN_TYPES.contains(name)) continue;
          filteredChildren.add(name, value);
        }
        else {
          if (name.equals(ProtocolParser.DUMMY_SPECIAL_VAR) || name.equals(ProtocolParser.DUMMY_IPYTHON_HIDDEN)) {
            isSpecialEmpty = false;
          }
          else {
            filteredChildren.add(name, value);
          }
        }
      }
    }
    node.addChildren(filteredChildren, isReturnEmpty && isSpecialEmpty);
    if (!isReturnEmpty) {
      addGroupValues(PyBundle.message("debugger.stack.frame.return.values"),
                     AllIcons.Debugger.WatchLastReturnValue, node, null, myDebugProcess, ProcessDebugger.GROUP_TYPE.RETURN, "()");
    }
    if (!isSpecialEmpty) {
      addGroupValues(PyBundle.message("debugger.stack.frame.special.variables"),
                     PythonIcons.Python.Debug.SpecialVar, node, null, myDebugProcess, ProcessDebugger.GROUP_TYPE.SPECIAL, null);
    }
    ApplicationManager.getApplication().getMessageBus().syncPublisher(TOPIC).stackFrameRefreshed();
  }
protected void addChildren(final @NotNull XCompositeNode node, final @Nullable XValueChildrenList children)