code: def test_validate_prediction_labels4(unimodal_model, dataset):
      """Test if an error is raised when a single loss function is complied but the prediction
      is a list of tensors."""
      y_pred = dataset["output"]["multimodal"]["y_pred"]
      y_true = dataset["output"]["unimodal"]["y_true"]
  
      with pytest.raises(ValueError) as err:
          unimodal_model.validate_prediction_labels(
              y_pred=y_pred, y_true=y_true
          )
  
      assert (
          "The prediction is a list and should be a tensor since only one loss has been passed"
          in str(err.value)
      )
  
imports: from typing import List
  import numpy
  import pytest
  import torch
  import torch.nn
  import torch.optim
  from torch.utils.data import DataLoader, TensorDataset
  from alibi.models.pytorch.metrics import AccuracyMetric, LossContainer
  from alibi.models.pytorch.model import Model
label_desc: Use image node_id 10 for calling a global function with example usage: test_validate_prediction_labels4(unimodal_model, dataset) without return types