MCPcopy Index your code
hub / github.com/VectifyAI/PageIndex / get_parent_structure

Function get_parent_structure

pageindex/utils.py:325–330  ·  view source on GitHub ↗

Helper function to get the parent structure code

(structure)

Source from the content-addressed store, hash-verified

323
324def list_to_tree(data):
325 def get_parent_structure(structure):
326 """Helper function to get the parent structure code"""
327 if not structure:
328 return None
329 parts = str(structure).split('.')
330 return '.'.join(parts[:-1]) if len(parts) > 1 else None
331
332 # First pass: Create nodes and track parent-child relationships
333 nodes = {}

Callers 1

list_to_treeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected