def METHOD_NAME(segmentation_masks, num_classes, value_range):
    segmentation_masks = utils.to_numpy(segmentation_masks)
    segmentation_masks = reshape_masks(segmentation_masks=segmentation_masks)
    # Interpolate the segmentation masks from the range of (0, num_classes)
    # to the value range provided.
    segmentation_masks = utils.transform_value_range(
        segmentation_masks,
        original_range=(0, num_classes),
        target_range=value_range,
    )
    return segmentation_masks