code: def test_predict(
      data: np.ndarray,
      params: dict,
      expected: Union[float, dict, bool],
      load_mnist_model,
  ):
      load_mnist_model.eval()
      training = params.pop("training", False)
      model = PyTorchModel(load_mnist_model, **params)
      if training:
          with pytest.raises(expected["exception"]):
              model.train()
              out = model.predict(x=data["x"])
          return
      out = model.predict(x=data["x"])
      assert np.allclose(out, expected), "Test failed."
  
file_path: Quantus/tests/functions/test_pytorch_model.py
imports: from collections import OrderedDict
  from typing import Union
  import numpy
  import pytest
  import torch
  from pytest_lazyfixture import lazy_fixture
  from scipy.special import softmax
  from quantus.helpers.model.pytorch_model import PyTorchModel
label_desc: Use image node_id 3 for calling a global function with example usage: test_predict(data, params, expected, load_mnist_model) without return types