def _move_crop(idx, direction):
    """ Image idx mover
        Takes idx as standardized dictionary {x1, x2, y1, y2}, where each part is pair of numbers giving the area of image
        And moves this indexes about 1 pixel in given direction
        Shifted reference is stationary and only image no 2 is shifted.

        :param idx: index of both images region
        :param direction: direction of the image shift

        :return: fixed indexes with respect to size of the image
        """
    if direction == 'right':
        idx['x2'] += 1
    elif direction == 'left':
        idx['x2'] += -1
    elif direction == 'top':
        idx['y2'] += -1
    elif direction == 'down':
        idx['y2'] += 1
    return idx