code: def check_data(self, X, y):
      if (
          (y is None)
          and (not is_dataset(X))
          and (self.iterator_train is DataLoader)
      ):
          raise ValueError(
              "No y-values are given (y=None). You must "
              "implement your own DataLoader for training "
              "(and your validation) and supply it using the "
              "``iterator_train`` and ``iterator_valid`` "
              "parameters respectively."
          )
      if y is None:
          # The user implements its own mechanism for generating y.
          return
  
file_path: skorch/skorch/regressor.py
imports: import re
  from sklearn.base import RegressorMixin
  import torch
  from torch.utils.data import DataLoader
  from skorch import NeuralNet
  from skorch.utils import get_dim
  from skorch.utils import is_dataset
label_desc: Use image node_id 2 for calling the NeuralNetRegressor obj's underlying member method code with example usage: obj.check_data(X, y) without return types