code: def test_module_output_2d_raises(self, net_cls, data):
      from skorch.toy import make_classifier
  
      module = make_classifier(
          input_units=20,
          output_units=2,
      )
      net = net_cls(module, max_epochs=1)
      with pytest.raises(ValueError) as exc:
          net.fit(*data)
  
      msg = exc.value.args[0]
      expected = (
          "Expected module output to have shape (n,) or "
          "(n, 1), got (128, 2) instead"
      )
      assert msg == expected
  
imports: from unittest.mock import Mock
  import numpy
  import pytest
  import torch
  from scipy.special import expit
  from sklearn.base import clone
  from torch import nn
  from skorch.tests.conftest import INFERENCE_METHODS
label_desc: Use image node_id 21 for calling the TestNeuralNetBinaryClassifier obj's underlying member method code with example usage: obj.test_module_output_2d_raises(net_cls, data) without return types