Image data augmentation with this function
Data augmentation is a technique for increasing the dataset size by performing certain operations over images such as translation, rotation, hue shift etc and increase the training dataset size. It could be applied to any kind of image dataset.

The above mentioned function seems to be applying shift with images of shape 8x8 and as far as the shape of the image is of this dimension, it will definitely work.

Refer to this paper for further reference.