code: def test_classes_are_set_with_tensordataset_explicit_y(
      self, net_cls, module_cls, data
  ):
      # see 990
      X = torch.from_numpy(data[0])
      y = torch.arange(len(X)) % 10
      dataset = torch.utils.data.TensorDataset(X, y)
      net = net_cls(module_cls, max_epochs=0).fit(dataset, y)
      assert (net.classes_ == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]).all()
  
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 18 for calling the TestNeuralNet obj's underlying member method code with example usage: obj.test_classes_are_set_with_tensordataset_explicit_y(net_cls, module_cls, data) without return types