code: def get_dataset_from_loader(dataloader):
      dataset = dataloader.dataset
      if isinstance(dataset, torch.utils.data.Subset):
          return dataset.dataset
      else:
          return dataset
  
imports: from concurrent.futures import ProcessPoolExecutor
  from contextlib import contextmanager
  from functools import wraps, lru_cache
  import hashlib
  import json
  import logging
  from pathlib import Path
  import typing
  import flashy
  import flashy.distrib
  import omegaconf
  import torch
  from torch.nn.utils.rnn import pad_sequence
label_desc: Use image node_id 5 for calling a global function with example usage: get_dataset_from_loader(dataloader) and returns: dataset, dataset