code: def augmentation(x, batch_size):
      xpad = np.pad(x, [[0, 0], [0, 0], [4, 4], [4, 4]], "symmetric")
      for data_num in range(0, batch_size):
          offset = np.random.randint(8, size=2)
          x[data_num, :, :, :] = xpad[
              data_num,
              :,
              offset[0] : offset[0] + 28,
              offset[1] : offset[1] + 28,
          ]
          if_flip = np.random.randint(2)
          if if_flip:
              x[data_num, :, :, :] = x[data_num, :, :, ::-1]
      return x
  
imports: from singa import singa_wrap
  from singa import autograd
  from singa import layer
  from singa import tensor
  from singa import device
  from singa import opt
  import numpy
  import os
  import sys
  import gzip
  import codecs
  import time
label_desc: Use image node_id 10 for calling a global function with example usage: augmentation(x, batch_size) and returns: x