code: def compute_new_image_size(
      image_size: tuple, tile_size: tuple, stride: tuple
  ) -> tuple:
      """This function checks if image size is divisible by tile size and stride.
  
      If not divisible, it resizes the image size to make it divisible.
  
      Args:
          image_size (tuple): Original image size
          tile_size (tuple): Tile size
          stride (tuple): Stride
  
      Examples:
          >>> compute_new_image_size(image_size=(512, 512), tile_size=(256, 256), stride=(128, 128))
          (512, 512)
  
          >>> compute_new_image_size(image_size=(512, 512), tile_size=(222, 222), stride=(111, 111))
          (555, 555)
  
      Returns:
          tuple: Updated image size that is divisible by tile size and stride.
      """
  
      def __compute_new_edge_size(
          edge_size: int, tile_size: int, stride: int
      ) -> int:
          """This function makes the resizing within the edge level."""
          if (edge_size - tile_size) % stride != 0:
              edge_size = (
                  ceil((edge_size - tile_size) / stride) * stride
              ) + tile_size
  
          return edge_size
  
      resized_h = __compute_new_edge_size(
          image_size[0], tile_size[0], stride[0]
      )
      resized_w = __compute_new_edge_size(
          image_size[1], tile_size[1], stride[1]
      )
  
      return resized_h, resized_w
  
imports: from __future__ import annotations
  from enum import Enum
  from itertools import product
  from math import ceil
  from typing import Sequence
  import torch
  import torchvision.transforms
  from torch import Tensor
  from torch.nn import functional
label_desc: Use image node_id 1 for calling a global function with example usage: compute_new_image_size(image_size, tile_size, stride) and returns: resized_h,  resized_w, edge_size