MCPcopy Create free account
hub / github.com/ChartGalaxy/ChartGalaxy / get_tree_height

Function get_tree_height

code_generation_benchmark/utils/utils_eval.py:100–106  ·  view source on GitHub ↗
(tree)

Source from the content-addressed store, hash-verified

98 return ele_list
99
100def get_tree_height(tree):
101 if not tree['children']:
102 return 1
103 max_height = 0
104 for child in tree['children']:
105 max_height = max(max_height, get_tree_height(child))
106 return max_height + 1
107
108def judge_invalid_elements(ele):
109 ref_group_name = ele['ref_group_name']

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected