def METHOD_NAME(cls, predictions):
    if isinstance(predictions, list) and not predictions:
        raise ValueError("The input list is empty")
    if isinstance(predictions, list) and all(
        isinstance(item, list) and not item for item in predictions
    ):
        raise ValueError("One or more lists in the returned prediction response are empty")
    elif all(isinstance(item, float) for item in predictions):
        return [predictions]
    else:
        return predictions