<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def map_indices_child2root(child, child_indices):
 """Map RTDC_Hierarchy event indices to root RTDCBase Parameters child: RTDC_Hierarchy RTDCBase hierarchy child child_indices: 1d ndarray child indices to map Returns ------- root_indices: 1d ndarray hierarchy root indices (not necessarily the indices of `parent`) """

    while True:
        indices = map_indices_child2parent(child=child,
                                           child_indices=child_indices)
        if isinstance(child.hparent, RTDC_Hierarchy):
            child = child.hparent
            child_indices = indices
        else:
            break
    return indices