@Override
  public void update(@NotNull AnActionEvent e) {
    List<XValueNodeImpl> selectedNodes = getSelectedNodes(e.getDataContext());
    if (selectedNodes.size() != 1) {
      e.getPresentation().setVisible(false);
      return;
    }

    XValueNodeImpl node = selectedNodes.get(0);
    if (!(node.getValueContainer() instanceof PyDebugValue debugValue) || !node.isComputed()) {
      e.getPresentation().setVisible(false);
      return;
    }

    String nodeType = debugValue.getType();
    if ("ndarray".equals(nodeType) ||
        "EagerTensor".equals(nodeType) ||
        "ResourceVariable".equals(nodeType) ||
        "SparseTensor".equals(nodeType) ||
        "Tensor".equals(nodeType)) {
      e.getPresentation().setText(PyBundle.message("debugger.numeric.view.as.array"));
      e.getPresentation().setVisible(true);
    }
    else if ("DataFrame".equals(nodeType) || "GeoDataFrame".equals(nodeType) || "Dataset".equals(nodeType)) {
      e.getPresentation().setText(PyBundle.message("debugger.numeric.view.as.dataframe"));
      e.getPresentation().setVisible(true);
    }
    else if ("Series".equals(nodeType) || "GeoSeries".equals(nodeType)) {
      e.getPresentation().setText(PyBundle.message("debugger.numeric.view.as.series"));
      e.getPresentation().setVisible(true);
    }
    else {
      e.getPresentation().setVisible(false);
    }
  }
@Override
  public void update(@NotNull AnActionEvent e)