code: def build_cityscapes_train_valid_datasets(data_path, image_size):
      args = get_args()
      args.num_classes = Cityscapes.num_classes
      args.ignore_index = Cityscapes.ignore_index
      args.color_table = Cityscapes.color_table
      args.mean_std = ([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
  
      train_joint_transform = VitSegmentationJointTransform(
          train=True, resolution=image_size
      )
      val_joint_transform = VitSegmentationJointTransform(
          train=False, resolution=image_size
      )
      train_image_transform = VitSegmentationImageTransform(
          train=True, resolution=image_size
      )
      val_image_transform = VitSegmentationImageTransform(
          train=False, resolution=image_size
      )
      train_target_transform = VitSegmentationTargetTransform(
          train=True, resolution=image_size
      )
      val_target_transform = VitSegmentationTargetTransform(
          train=False, resolution=image_size
      )
  
      # training dataset
      train_data = Cityscapes(
          root=data_path[0],
          split="train",
          mode="fine",
          resolution=image_size,
      )
      train_data = RandomSeedSegmentationDataset(
          train_data,
          joint_transform=train_joint_transform,
          image_transform=train_image_transform,
          target_transform=train_target_transform,
      )
  
      # validation dataset
      val_data = Cityscapes(
          root=data_path[0],
          split="val",
          mode="fine",
          resolution=image_size,
      )
  
      val_data = RandomSeedSegmentationDataset(
          val_data,
          joint_transform=val_joint_transform,
          image_transform=val_image_transform,
          target_transform=val_target_transform,
      )
  
      return train_data, val_data
  
imports: import random
  import os
  import math
  import mmcv
  import torch
  import numpy
  import torchvision.transforms
  from torchvision import datasets
  from torch.utils.data import Dataset
  from megatron.data.autoaugment import ImageNetPolicy
  from tasks.vision.segmentation.cityscapes import Cityscapes
  import tasks.vision.segmentation.transforms
  from megatron.data.autoaugment import ImageNetPolicy
  from megatron import get_args
  from PIL import Image, ImageOps
label_desc: Use image node_id 1 for calling a global function with example usage: build_cityscapes_train_valid_datasets(data_path, image_size) and returns: train_data,  val_data