def METHOD_NAME(classes):
    annotations = []
    child_classes = {}
    for cls, path in classes:
        parent = get_first_public_parent(cls)
        if parent not in child_classes:
            child_classes[parent] = [cls]
        else:
            child_classes[parent].append(cls)
        annotations.append(dict(cls=cls, path=path, parent=parent))
    for annotation in annotations:
        annotation["children"] = child_classes.get(annotation["cls"])
    return annotations