code: def is_skorch_dataset(ds):
      
      from skorch.dataset import Dataset
      if isinstance(ds, Subset):
          return is_skorch_dataset(ds.dataset)
      return isinstance(ds, Dataset)
docs: Checks if the supplied dataset is an instance of
      ``skorch.dataset.Dataset`` even when it is nested inside
      ``torch.util.data.Subset``.