feat: add group_elements_by_parent_id utility function (#4207)
Add a utility function to group elements by their parent_id metadata
field. This allows users to easily traverse document hierarchy by
grouping elements that share the same parent.
Includes an optional 'assign_orphans' parameter that, when True, assigns
elements with no parent_id to the same group as the previous element.
Fixes #1489