code: def getDataLoaders(self, batch_size, shuffle=True, device="cuda"):
      if not (
          os.path.exists("../data/train-ms-mnist-idx.pt")
          and os.path.exists("../data/train-ms-svhn-idx.pt")
          and os.path.exists("../data/test-ms-mnist-idx.pt")
          and os.path.exists("../data/test-ms-svhn-idx.pt")
      ):
          raise RuntimeError(
              "Generate transformed indices with the script in bin"
          )
      # get transformed indices
      t_mnist = torch.load("../data/train-ms-mnist-idx.pt")
      t_svhn = torch.load("../data/train-ms-svhn-idx.pt")
      s_mnist = torch.load("../data/test-ms-mnist-idx.pt")
      s_svhn = torch.load("../data/test-ms-svhn-idx.pt")
  
      # load base datasets
      t1, s1 = self.vaes[0].getDataLoaders(batch_size, shuffle, device)
      t2, s2 = self.vaes[1].getDataLoaders(batch_size, shuffle, device)
  
      train_mnist_svhn = TensorDataset(
          [
              ResampleDataset(
                  t1.dataset, lambda d, i: t_mnist[i], size=len(t_mnist)
              ),
              ResampleDataset(
                  t2.dataset, lambda d, i: t_svhn[i], size=len(t_svhn)
              ),
          ]
      )
      test_mnist_svhn = TensorDataset(
          [
              ResampleDataset(
                  s1.dataset, lambda d, i: s_mnist[i], size=len(s_mnist)
              ),
              ResampleDataset(
                  s2.dataset, lambda d, i: s_svhn[i], size=len(s_svhn)
              ),
          ]
      )
  
      kwargs = (
          {"num_workers": 2, "pin_memory": True}
          if device == "cuda"
          else {}
      )
      train = DataLoader(
          train_mnist_svhn,
          batch_size=batch_size,
          shuffle=shuffle,
          **kwargs,
      )
      test = DataLoader(
          test_mnist_svhn,
          batch_size=batch_size,
          shuffle=shuffle,
          **kwargs,
      )
      return train, test
  
imports: import os
  import torch
  import torch.distributions
  import torch.nn
  import torch.nn.functional
  from numpy import sqrt, prod
  from torch.utils.data import DataLoader
  from torchnet.dataset import TensorDataset, ResampleDataset
  from torchvision.utils import save_image, make_grid
  from vis import plot_embeddings, plot_kls_df
  from .mmvae import MMVAE
  from .vae_mnist import MNIST
  from .vae_svhn import SVHN
label_desc: Use image node_id 3 for calling the MNIST_SVHN obj's underlying member method code with example usage: obj.getDataLoaders(batch_size, shuffle, device) and returns: train,  test