import torch


def create_the_slices(image, label, slices: int = 5, dim: int = 0):
    """ Splitting raw input image into slices

    Args:
        image (torch.tensor): Input image
        label (torch.tensor): Target label
        slices (int, optional): Split size. Defaults to 5.
        dim (int, optional): Dimension of splitting. Defaults to 0.

    Returns:
        [float]: list of tensor images,
        [float]: list of tensor labels 
    """    
    images = torch.split(image, slices, dim=dim)
    labels = [label]*len(images)
    return images, labels