code: def test_divisible_tile_size_and_stride(
      image_size, tile_size, stride, mode
  ):
      """When the image is not divisible by tile size and stride, Tiler should up
      samples the image before tiling, and downscales before untiling.
      """
      tiler = Tiler(tile_size, stride, mode=mode)
      image = torch.rand(image_size)
      tiles = tiler.tile(image)
      reconstructed_image = tiler.untile(tiles)
      assert image.shape == reconstructed_image.shape
  
      if mode == "padding":
          assert torch.allclose(image, reconstructed_image)
  
file_path: anomalib/tests/pre_merge/pre_processing/test_tiler.py
imports: import pytest
  import torch
  from omegaconf import ListConfig
  from anomalib.pre_processing.tiler import StrideSizeError, Tiler
label_desc: Use image node_id 8 for calling a global function with example usage: test_divisible_tile_size_and_stride(image_size, tile_size, stride, mode) without return types