def METHOD_NAME(sheet, services_indexes):
    result = {}
    current_class_name, current_index = services_indexes[0]
    for next_class_name, next_index in services_indexes[1:]:
        result[current_class_name] = get_services_in_details(sheet, current_index + 2, next_index)
        current_index = next_index
        current_class_name = next_class_name
    result[current_class_name] = get_services_in_details(sheet, current_index + 2, sheet.nrows)
    return result