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

Function normalize_leafs

code_generation_benchmark/utils/utils_eval.py:181–183  ·  view source on GitHub ↗
(leafs, ref)

Source from the content-addressed store, hash-verified

179 normalize_tree_leafs(child, ref)
180
181def normalize_leafs(leafs, ref):
182 for leaf in leafs:
183 leaf['node']['norm_bbox'] = normalize_bbox(leaf['node']['bounding_box'], ref)
184
185def leaf_cost(gleaf, pleaf):
186 is_both_image = (gleaf['node']['tag'] == 'image' and pleaf['node']['tag'] == 'g' and pleaf['ref_group_name'] in ['icon-item', 'image'])

Callers

nothing calls this directly

Calls 1

normalize_bboxFunction · 0.85

Tested by

no test coverage detected