To provide useful error handling, `asciigraf` generates error messages that hightlight bad edges using colour (see the `highlight_bad_edge_characters` function).
For libraries that use `asciigraf`, there may at times be value in being able to generate similar highlighting to provide more specific feedback related to the use-case (e.g. if a library has specific rules about how to name nodes and what the names imply, it would be useful to highlight invalid ones in an error message).
Including the ascii string as a graph attribute makes this functionality easier to build, since the calling code can reproduce the input text just by having the graph object produced by `asciigraf`. Libraries can do things like defining a function to produce highlighting:
python
def highlight_node(asciigraf_obj: networkx.Graph, node: str) -> str:
...
def highlight_edge(asciigraf_obj: networkx.Graph, edge: Tuple[str, str]) -> str:
...
These functions can find the positions of `node` or `edge` using node / edge attributes on the input graph, and can reconstruct a highlighted textual version of the source asciigram. Without the change here, we would need to pass the ascii string separately.