code: def get_imagenet_transforms(data_shape=224, dtype="float32"):
      def train_transform(image, label):
          image, _ = mx.image.random_size_crop(
              image, (data_shape, data_shape), 0.08, (3 / 4.0, 4 / 3.0)
          )
          image = mx.nd.image.random_flip_left_right(image)
          image = mx.nd.image.to_tensor(image)
          image = mx.nd.image.normalize(
              image,
              mean=(0.485, 0.456, 0.406),
              std=(0.229, 0.224, 0.225),
          )
          return mx.nd.cast(image, dtype), label
  
      def val_transform(image, label):
          image = mx.image.resize_short(image, data_shape + 32)
          image, _ = mx.image.center_crop(
              image, (data_shape, data_shape)
          )
          image = mx.nd.image.to_tensor(image)
          image = mx.nd.image.normalize(
              image,
              mean=(0.485, 0.456, 0.406),
              std=(0.229, 0.224, 0.225),
          )
          return mx.nd.cast(image, dtype), label
  
      return train_transform, val_transform
  
imports: import os
  import random
  import tarfile
  import logging
  import tarfile
  import mxnet
  from mxnet.test_utils import get_cifar10
  from mxnet.gluon.data.vision import ImageFolderDataset
  from mxnet.gluon.data import DataLoader
  from mxnet.contrib.io import DataLoaderIter
label_desc: Use image node_id 2 for calling a global function with example usage: get_imagenet_transforms(data_shape, dtype) and returns: train_transform,  val_transform, mx,  label, mx,  label