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.
code: def __init__(
      self,
      X,
      y=None,
      length=None,
  ):
      self.X = X
      self.y = y
  
      self.X_indexing = check_indexing(X)
      self.y_indexing = check_indexing(y)
      self.X_is_ndframe = is_pandas_ndframe(X)
  
      if length is not None:
          self._len = length
          return
  
      # pylint: disable=invalid-name
      len_X = get_len(X)
      if y is not None:
          len_y = get_len(y)
          if len_y != len_X:
              raise ValueError("X and y have inconsistent lengths.")
      self._len = len_X
  
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 1 to create a new Dataset object from inherited base classes: torch.utils.data with example: obj = Dataset(X, y, length)