Here is my situation: my language uses "indirect" ops, e.g. instead of having (Add x y), my language instead uses (Op2 (Add) x y). When I visualize the egraph, it's not super useful to see a node labeled Op2 -- specifically, when the arrow for its first child (the Add) is lost in a jumble of other arrows.
I have my own local hack of egraph_serialize that allows users to specify a custom label_fn to generate labels. The function takes a node ID and the egraph, and produces a string. I can use the function to produce node labels like "Op2 Add", which is much more useful.
Is something like this already possible somehow? Would you be amenable to adding something like this?