code: def augment_img(X, rotate=10, px=3):
      Xaug = np.zeros_like(X)
      for i in trange(len(X)):
          im = Image.fromarray(X[i])
          im = im.rotate(
              np.random.randint(-rotate, rotate), resample=Image.BICUBIC
          )
          w, h = X.shape[1:]
          # upper left, lower left, lower right, upper right
          quad = np.random.randint(-px, px, size=(8)) + np.array(
              [0, 0, 0, h, w, h, w, 0]
          )
          im = im.transform(
              (w, h), Image.QUAD, quad, resample=Image.BICUBIC
          )
          Xaug[i] = im
      return Xaug
  
imports: import numpy
  from PIL import Image
  from pathlib import Path
  import sys
  from extra.datasets import fetch_mnist
  from tqdm import trange
label_desc: Use image node_id 1 for calling a global function with example usage: augment_img(X, rotate, px) and returns: Xaug