code: def test_argmax_transformer(monkeypatch, out_dim, out_type):
      """
      Test that the conversion of output probabilities to class labels works
      for a range of classifier output types.
      """
  
      # setup a transformer with a mock predictor
      transformer = ArgmaxTransformer(None)
      monkeypatch.setattr(
          transformer,
          "predictor",
          MockPredictor(
              out_dim,
              out_type=out_type,
          ),
      )
      # fake predictor input
      X = np.random.random(size=(50, 14))
  
      result = transformer(X)
      # argmax transformer should do get rid of the feature dimension
      assert len(result.shape) == len(X.shape) - 1
  
imports: import pytest
  import numpy
  from alibi.tests.utils import MockPredictor
  from alibi.utils.wrappers import ArgmaxTransformer
label_desc: Use image node_id 1 for calling a global function with example usage: test_argmax_transformer(monkeypatch, out_dim, out_type) without return types