Resolves a node id to its parent node id (O(1) when cached).
typedef ParentResolver = String? Function(String childId);