from typing import List


def nd_slice(d: int, dim: int = 0, start: int = 0, end: int = 1) -> List[slice]:
    """Create a multi-dimensional slice.

    Args:
        d (int): number of dimensions
        dim (int, optional): target dimension that will be sliced. Defaults to 0.
        start (int, optional): start index in the target dimension. Defaults to 0.
        end (int, optional): end index in the target dimension. Defaults to 1.

    Returns:
        List[slice]: multi-dimensional slice
    """
    indexes = [slice(None)] * d
    indexes[dim] = slice(start, end)
    return indexes