def ensemble_predictions(predictions_list, predict_label_mappings, task):
    if ((len(predictions_list) == 0) or (len(predictions_list[0]) == 0)):
        return []
    index = 0
    predictions = predictions_list[index]
    predict_label_mapping = predict_label_mappings[index]
    if (task == TaskType.IMAGE_CLASSIFICATION):
        pred_indices = np.argmax(predictions, axis=1)
        predictions = [predict_label_mapping[str(i)] for i in pred_indices]
    return predictions
def ensemble_predictions(predictions_list, predict_label_mappings, task):
    if ((len(predictions_list) == 0) or (len(predictions_list[0]) == 0)):
        return []
    index = 0
    predictions = predictions_list[index]
    predict_label_mapping = predict_label_mappings[index]
    if (task == TaskType.IMAGE_CLASSIFICATION):
        pred_indices = np.argmax(predictions, axis=1)
        predictions = [predict_label_mapping[str(i)] for i in pred_indices]
    return predictions