code: def _cache_dataset(self):
      train_dataset = TabularDataset(
          task=self.config.task,
          data=self.train,
          categorical_cols=self.config.categorical_cols,
          continuous_cols=self.config.continuous_cols,
          target=self.target,
      )
      self.train = None
      validation_dataset = TabularDataset(
          task=self.config.task,
          data=self.validation,
          categorical_cols=self.config.categorical_cols,
          continuous_cols=self.config.continuous_cols,
          target=self.target,
      )
      self.validation = None
  
      if self.cache_mode is self.CACHE_MODES.DISK:
          torch.save(train_dataset, self.cache_dir / "train_dataset")
          torch.save(
              validation_dataset, self.cache_dir / "validation_dataset"
          )
      elif self.cache_mode is self.CACHE_MODES.MEMORY:
          self.train_dataset = train_dataset
          self.validation_dataset = validation_dataset
      elif self.cache_mode is self.CACHE_MODES.INFERENCE:
          self.train_dataset = None
          self.validation_dataset = None
      else:
          raise ValueError(
              f"{self.cache_mode} is not a valid cache mode"
          )
  
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 23 for calling the TabularDatamodule obj's underlying member method code with example usage: obj._cache_dataset() without return types