def create_subimages(image, n_x=3, n_y=3, im_size_x=400, im_size_y=400):
    """Splits an image into smaller images to fit images with given size with even spacing

    Parameters
    ----------
    image : 2D numpy array
        Input image that is used to create smaller subimages
    n_x : int
        Number of subimages along x-axis.
    n_y : int
        Number of subimages along y-axis.
    im_size_x : int
        Width of the subimages.
    im_size_y : int
        Height of the subimages.
    """
    swipe_range_x = image.shape[0] - im_size_x
    swipe_x = swipe_range_x // n_x
    swipe_range_y = image.shape[1] - im_size_y
    swipe_y = swipe_range_y // n_y
    subimages = []
    for x in range(n_x):
        for y in range(n_y):
            x_ind = swipe_x * x
            y_ind = swipe_y * y
            subimages.append(image[x_ind:x_ind + im_size_x, y_ind:y_ind + im_size_y])
    return subimages