def __compute_new_edge_size(edge_size: int, tile_size: int, stride: int) -> int:
        """Compute new edge size that is divisible by tile size and stride.

        Args:
            edge_size: Original edge size
            tile_size: Tile size for this edge
            stride: Stride size for this edge

        Returns:
            int: New edge size
        """
        if (edge_size - tile_size) % stride != 0:
            edge_size = (ceil((edge_size - tile_size) / stride) * stride) + tile_size

        return edge_size
Compute new edge size that is divisible by tile size and stride.

        Args:
            edge_size: Original edge size
            tile_size: Tile size for this edge
            stride: Stride size for this edge

        Returns:
            int: New edge size
        
src/anomalib/data/utils/tiler.py