code: def image_batch_pairs(
      crop_size_w: int,
      crop_size_h: int,
      batch_size_gpu0: int,
      max_scales: Optional[float] = 5,
      check_scale_div_factor: Optional[int] = 32,
      min_crop_size_w: Optional[int] = 160,
      max_crop_size_w: Optional[int] = 320,
      min_crop_size_h: Optional[int] = 160,
      max_crop_size_h: Optional[int] = 320,
      *args,
      **kwargs,
  ) -> List[Tuple[int, int, int]]:
      """This function creates batch and image size pairs.  For a given batch size and image size, different image sizes
          are generated and batch size is adjusted so that GPU memory can be utilized efficiently.
  
      Args:
          crop_size_w: Base Image width (e.g., 224)
          crop_size_h: Base Image height (e.g., 224)
          batch_size_gpu0: Batch size on GPU 0 for base image
          max_scales: Number of scales. How many image sizes that we want to generate between min and max scale factors. Default: 5
          check_scale_div_factor: Check if image scales are divisible by this factor. Default: 32
          min_crop_size_w: Min. crop size along width. Default: 160
          max_crop_size_w: Max. crop size along width. Default: 320
          min_crop_size_h: Min. crop size along height. Default: 160
          max_crop_size_h: Max. crop size along height. Default: 320
  
      Returns:
          a sorted list of tuples. Each index is of the form (h, w, batch_size)
  
      """
      width_dims = create_intervallic_integer_list(
          crop_size_w,
          min_crop_size_w,
          max_crop_size_w,
          max_scales,
          check_scale_div_factor,
      )
      height_dims = create_intervallic_integer_list(
          crop_size_h,
          min_crop_size_h,
          max_crop_size_h,
          max_scales,
          check_scale_div_factor,
      )
      img_batch_tuples = set()
      n_elements = crop_size_w * crop_size_h * batch_size_gpu0
      for crop_h, crop_y in zip(height_dims, width_dims):
          # compute the batch size for sampled image resolutions with respect to the base resolution
          _bsz = max(1, int(round(n_elements / (crop_h * crop_y), 2)))
  
          img_batch_tuples.add((crop_h, crop_y, _bsz))
  
      img_batch_tuples = list(img_batch_tuples)
      return sorted(img_batch_tuples)
  
imports: from typing import List, Optional, Tuple, Union
  import numpy
  from utils.math_utils import make_divisible
label_desc: Use image node_id 1 for calling a global function with example usage: image_batch_pairs(crop_size_w, crop_size_h, batch_size_gpu0, max_scales, check_scale_div_factor, min_crop_size_w, max_crop_size_w, min_crop_size_h, max_crop_size_h) and returns: sorted