def test_tiler_handles_single_image_without_batch_dimension(
    image_size: tuple,
    tile_size: int,
    stride: int,
    shape: torch.Size,
    use_random_tiling: bool,
) -> None:
    """Tiler should add batch dimension if image is 3D (CxHxW)."""
    tiler = Tiler(tile_size=tile_size, stride=stride)
    image = torch.rand(image_size)
    patches = tiler.tile(image, use_random_tiling=use_random_tiling)
    assert patches.shape == shape
Tiler should add batch dimension if image is 3D (CxHxW).
tests/unit/data/utils/test_tiler.py