MCPcopy Create free account
hub / github.com/InternScience/InternAgent / wrap_text

Function wrap_text

internagent/vis_tree.py:11–13  ·  view source on GitHub ↗

Wraps text to a specified width for node labels.

(text, width)

Source from the content-addressed store, hash-verified

9NODE_WIDTH = 80 # Approx characters per line in node label
10
11def wrap_text(text, width):
12 """Wraps text to a specified width for node labels."""
13 return '\n'.join(textwrap.wrap(text, width=width, replace_whitespace=False))
14
15def build_graph_recursive(graph, hyp_id, hyp_map, child_map):
16 """Recursively adds nodes and edges to the graphviz object."""

Callers 1

build_graph_recursiveFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected