code: def augment(x):
      if random.random() < 0.5:
          x = x[
              :, :, :, ::-1
          ]  # Flip the batch images about the horizontal axis
      # Pixel-shift all images in the batch by up to 4 pixels in any direction.
      x_pad = np.pad(x, [[0, 0], [0, 0], [4, 4], [4, 4]], "reflect")
      rx, ry = np.random.randint(0, 8), np.random.randint(0, 8)
      x = x_pad[:, :, rx : rx + 32, ry : ry + 32]
      return x
  
file_path: objax/examples/image_classification/cifar10_simple.py
imports: import random
  import numpy
  import tensorflow
  import objax
  from objax.zoo.wide_resnet import WideResNet
label_desc: Use image node_id 3 for calling a global function with example usage: augment(x) and returns: x