code: def test_bagging_regressor(
      self, net_cls, module_cls, data, module_pred_1d_cls, recwarn
  ):
      # https://github.com/skorch-dev/skorch/issues/972
      from sklearn.ensemble import BaggingRegressor
  
      net = net_cls(
          module_pred_1d_cls
      )  # module output should be 1d too
      X, y = data
      X, y = X[:100], y[:100]  # less data to run faster
      y = y.flatten()  # make y 1d or else sklearn will complain
      regr = BaggingRegressor(net, n_estimators=2, random_state=0)
      regr.fit(X, y)  # does not raise
      assert not recwarn.list
  
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 19 for calling the TestNeuralNetRegressor obj's underlying member method code with example usage: obj.test_bagging_regressor(net_cls, module_cls, data, module_pred_1d_cls, recwarn) without return types