code: def test_net_learns(self, net, net_cls, data, module_cls):
      X, y = data
      net = net_cls(
          module_cls,
          max_epochs=10,
          lr=0.1,
      )
      net.fit(X, y)
      train_losses = net.history[:, "train_loss"]
      assert train_losses[0] > 2 * train_losses[-1]
  
imports: from functools import partial
  import numpy
  import pytest
  from sklearn.base import clone
  from skorch.tests.conftest import INFERENCE_METHODS
label_desc: Use image node_id 12 for calling the TestNeuralNetRegressor obj's underlying member method code with example usage: obj.test_net_learns(net, net_cls, data, module_cls) without return types