docs: def map_indices_root2child(child, root_indices):
      """Map root RTDCBase event indices to child RTDCBase
  
      Parameters
      ----------
      parent: RTDCBase
          hierarchy parent of `child`.
      root_indices: 1d ndarray
          hierarchy root indices to map
          (not necessarily the indices of `parent`)
  
      Returns
      -------
      child_indices: 1d ndarray
          child indices
      """
      # construct hierarchy tree containing only RTDC_Hierarchy instances
      hierarchy = [child]
      while True:
          if isinstance(child.hparent, RTDC_Hierarchy):
              # the parent is a hierarchy tree
              hierarchy.append(child.hparent)
              child = child.hparent
          else:
              break
  
      indices = root_indices
      for hp in hierarchy[::-1]:  # reverse order
          # For each hierarchy parent, map the indices down the
          # hierarchy tree.
          indices = map_indices_parent2child(child=hp,
                                             parent_indices=indices)
      return indices