docstr: Downloads the data, parse it and split the data into train, test, validation data
  
  :param stage: Stage - training or testing
docstr_tok: ["Downloads","the","data",",","parse","it","and","split","the","data","into","train",",","test",",","validation","data",":","param","stage",":","Stage","-","training","or","testing"]
code: def setup(self, stage=None):
      """
      Downloads the data, parse it and split the data into train, test, validation data
  
      :param stage: Stage - training or testing
      """
  
      self.df_train = datasets.MNIST(
          "dataset", download=True, train=True, transform=self.transform
      )
      self.df_train, self.df_val = random_split(
          self.df_train, [55000, 5000]
      )
      self.df_test = datasets.MNIST(
          "dataset",
          download=True,
          train=False,
          transform=self.transform,
      )
  
imports: import os
  import lightning
  import torch
  from lightning.pytorch.callbacks import EarlyStopping, LearningRateMonitor, ModelCheckpoint
  from lightning.pytorch.cli import LightningCLI
  from torch.nn import functional
  from torch.utils.data import DataLoader, random_split
  from torchmetrics.functional import accuracy
  from torchvision import datasets, transforms
  import mlflow.pytorch
label_desc: Use image node_id 2 for calling the MNISTDataModule obj's underlying member method code with example usage: obj.setup(stage) without return types