code: def test_pad_if_needed(
      augmentation_cls: Type[A.PadIfNeeded],
      params: Dict,
      image_shape: Tuple[int, int],
  ):
      image = np.zeros(image_shape)
      pad = augmentation_cls(**params)
  
      image_padded = pad(image=image)["image"]
  
      if pad.min_width is not None:
          assert image_padded.shape[1] >= pad.min_width
  
      if pad.min_height is not None:
          assert image_padded.shape[0] >= pad.min_height
  
      if pad.pad_width_divisor is not None:
          assert image_padded.shape[1] % pad.pad_width_divisor == 0
          assert image_padded.shape[1] >= image.shape[1]
          assert (
              image_padded.shape[1] - image.shape[1]
              <= pad.pad_width_divisor
          )
  
      if pad.pad_height_divisor is not None:
          assert image_padded.shape[0] % pad.pad_height_divisor == 0
          assert image_padded.shape[0] >= image.shape[0]
          assert (
              image_padded.shape[0] - image.shape[0]
              <= pad.pad_height_divisor
          )
  
imports: import random
  from typing import Dict, Tuple, Type
  import cv2
  import numpy
  import pytest
  import albumentations
  from .utils import get_dual_transforms, get_image_only_transforms, get_transforms
label_desc: Use image node_id 15 for calling a global function with example usage: test_pad_if_needed(augmentation_cls, params, image_shape) without return types