def slice_detections(all_ground_truth_bboxes, slice_mode):
    """ Find indices of detections of interest and modify the ground truth detections based on
        slice mode.
        Params:
            all_ground_truth_boxes (List of xml.etree.ElementTree.Element): List of all ground
                truth bounding boxes found in XML
            slice_mode (str): Slice mode that determines which indices to slice and return
        Returns:
            sliced_ground_truth_boxes (List of xml.etree.ElementTree.Element): List of sliced and
                modified ground truth bounding boxes
    """
    sliced_ground_truth_boxes = []
    if slice_mode == "dolly":
        # This mode returns all non-reflection full dolly detections and renames them "dolly"
        # from "Dolly-Full"
        for i in range(len(all_ground_truth_bboxes)):
            box = all_ground_truth_bboxes[i]
            row = {a.attrib['name']: a.text for a in box.findall("./attribute")}
            row.update(box.attrib)
            if row['label'] == 'Dolly-Full' and row['Reflection'] == 'false':
                box.attrib['label'] = "dolly"
                sliced_ground_truth_boxes.append(box)
    else:
        sliced_ground_truth_boxes = all_ground_truth_bboxes

    return sliced_ground_truth_boxes