class_docstr: General dataset wrapper that can be used in conjunction with
  PyTorch :class:`~torch.utils.data.DataLoader`.
  
  The dataset will always yield a tuple of two values, the first
  from the data (``X``) and the second from the target (``y``).
  However, the target is allowed to be ``None``. In that case,
  :class:`.Dataset` will currently return a dummy tensor, since
  :class:`~torch.utils.data.DataLoader` does not work with
  ``None``\s.
  
  :class:`.Dataset` currently works with the following data types:
  
  * numpy ``array``\s
  * PyTorch :class:`~torch.Tensor`\s
  * scipy sparse CSR matrices
  * pandas NDFrame
  * a dictionary of the former three
  * a list/tuple of the former three
  
  Parameters
  ----------
  X : see above
    Everything pertaining to the input data.
  
  y : see above or None (default=None)
    Everything pertaining to the target, if there is anything.
  
  length : int or None (default=None)
    If not ``None``, determines the length (``len``) of the data.
    Should usually be left at ``None``, in which case the length is
    determined by the data itself.
docstr: Additional transformations on ``X`` and ``y``.
  
  By default, they are cast to PyTorch :class:`~torch.Tensor`\s.
  Override this if you want a different behavior.
  
  Note: If you use this in conjuction with PyTorch
  :class:`~torch.utils.data.DataLoader`, the latter will call
  the dataset for each row separately, which means that the
  incoming ``X`` and ``y`` each are single rows.
docstr_tok: ["Additional","transformations","on","``","X","``","and","``","y","``",".","By","default",",","they","are","cast","to","PyTorch",":","class",":","`","~torch.Tensor","`","\\s",".","Override","this","if","you","want","a","different","behavior",".","Note",":","If","you","use","this","in","conjuction","with","PyTorch",":","class",":","`","~torch.utils.data.DataLoader","`",",","the","latter","will","call","the","dataset","for","each","row","separately",",","which","means","that","the","incoming","``","X","``","and","``","y","``","each","are","single","rows","."]
code: def transform(self, X, y):
      # pylint: disable=anomalous-backslash-in-string
      """Additional transformations on ``X`` and ``y``.
  
      By default, they are cast to PyTorch :class:`~torch.Tensor`\s.
      Override this if you want a different behavior.
  
      Note: If you use this in conjuction with PyTorch
      :class:`~torch.utils.data.DataLoader`, the latter will call
      the dataset for each row separately, which means that the
      incoming ``X`` and ``y`` each are single rows.
  
      """
      # pytorch DataLoader cannot deal with None so we use 0 as a
      # placeholder value. We only return a Tensor with one value
      # (as opposed to ``batchsz`` values) since the pytorch
      # DataLoader calls __getitem__ for each row in the batch
      # anyway, which results in a dummy ``y`` value for each row in
      # the batch.
      y = torch.Tensor([0]) if y is None else y
  
      # pytorch cannot convert sparse matrices, for now just make it
      # dense; squeeze because X[i].shape is (1, n) for csr matrices
      if sparse.issparse(X):
          X = X.toarray().squeeze(0)
      return X, y
  
imports: import warnings
  from collections.abc import Mapping
  from functools import partial
  from numbers import Number
  import numpy
  from scipy import sparse
  from sklearn.model_selection import ShuffleSplit
  from sklearn.model_selection import StratifiedKFold
  from sklearn.model_selection import StratifiedShuffleSplit
  from sklearn.model_selection import check_cv
  import torch
  import torch.utils.data
  from skorch.utils import flatten
  from skorch.utils import is_pandas_ndframe
  from skorch.utils import check_indexing
  from skorch.utils import multi_indexing
  from skorch.utils import to_numpy
label_desc: Use image node_id 3 for calling the Dataset obj's underlying member method code with example usage: obj.transform(X, y) and returns: X,  y