code: def _load_dataset_from_cache(self, tag: str = "train"):
      if self.cache_mode is self.CACHE_MODES.MEMORY:
          try:
              dataset = getattr(self, f"_{tag}_dataset")
          except AttributeError:
              raise AttributeError(
                  f"{tag}_dataset not found in memory. Please provide the data for"
                  f" {tag} dataloader"
              )
      elif self.cache_mode is self.CACHE_MODES.DISK:
          try:
              dataset = torch.load(self.cache_dir / f"{tag}_dataset")
          except FileNotFoundError:
              raise FileNotFoundError(
                  f"{tag}_dataset not found in {self.cache_dir}. Please provide the"
                  f" data for {tag} dataloader"
              )
      elif self.cache_mode is self.CACHE_MODES.INFERENCE:
          raise RuntimeError(
              "Cannot load dataset in inference mode. Use"
              " `prepare_inference_dataloader` instead"
          )
      else:
          raise ValueError(
              f"{self.cache_mode} is not a valid cache mode"
          )
      return dataset
  
imports: import re
  import warnings
  from enum import Enum
  from pathlib import Path
  from typing import Dict, Iterable, List, Optional, Tuple, Union
  import joblib
  import numpy
  import pandas
  import pytorch_lightning
  import torch
  from omegaconf import DictConfig
  from pandas import DataFrame, DatetimeTZDtype, to_datetime
  from pandas.tseries import offsets
  from pandas.tseries.frequencies import to_offset
  from sklearn.base import TransformerMixin, copy
  from sklearn.preprocessing import FunctionTransformer, LabelEncoder, PowerTransformer, QuantileTransformer, StandardScaler
  from torch.utils.data import DataLoader, Dataset
  from pytorch_tabular.config import InferredConfig
  from pytorch_tabular.utils import get_logger
  from .categorical_encoders import OrdinalEncoder
label_desc: Use image node_id 30 for calling the TabularDatamodule obj's underlying member method code with example usage: obj._load_dataset_from_cache(tag) and returns: dataset