import torch
import random


def integer_translation(images: torch.Tensor) -> torch.Tensor:
    """
    Function implements integer translation augmentation
    :param images: (torch.Tensor) Input images
    :return: (torch.Tensor) Augmented images
    """
    # Get translation index
    translation_index = (int(images.shape[-2] * random.uniform(-0.125, 0.125)),
                         int(images.shape[-1] * random.uniform(-0.125, 0.125)))
    # Apply translation
    return torch.roll(images, shifts=translation_index, dims=(-2, -1))