code: def test_mnist_classifier(output_dim):
      """Tests whether the `MNISTClassifier` has a deterministic output when is in the
      evaluation mode and if the output shape matches the expectation.
      """
      x = torch.randn(1, 1, 28, 28)
      model = MNISTClassifier(output_dim=output_dim)
  
      model.eval()
      output1 = model(x)
      output2 = model(x)
      assert torch.allclose(output1, output2)
      assert output1.shape[-1] == output_dim
  
file_path: alibi/alibi/models/pytorch/tests/test_cfrl_models.py
imports: import pytest
  import torch
  from alibi.models.pytorch import AE, HeAE
  from alibi.models.pytorch.cfrl_models import ADULTDecoder, ADULTEncoder, MNISTClassifier, MNISTDecoder, MNISTEncoder
label_desc: Use image node_id 1 for calling a global function with example usage: test_mnist_classifier(output_dim) without return types