class_docstr: Pad side of the image so that its side is divisible by divisor.
  
  Args:
      divisor (int): desirable image size divisor
      border_mode (OpenCV flag): OpenCV border mode.
      fill_value (int, float, list of int, lisft of float): padding value if border_mode is cv2.BORDER_CONSTANT.
class_docstr_tok: ["Pad","side","of","the","image","so","that","its","side","is","divisible","by","divisor",".","Args",":","divisor","(","int",")",":","desirable","image","size","divisor","border_mode","(","OpenCV","flag",")",":","OpenCV","border","mode",".","fill_value","(","int",",","float",",","list","of","int",",","lisft","of","float",")",":","padding","value","if","border_mode","is","cv2.BORDER_CONSTANT","."]
code: def transform(self, image: ndarray, mask: ndarray) -> APack:
      if cv2 is None:
          raise ValueError("`cv2` is needed for `PadToDivisor`")
  
      self._pads = PadToDivisor.PadParams(
          *self._get_dim_padding(image.shape[0]),
          *self._get_dim_padding(image.shape[1]),
      )
  
      image = cv2.copyMakeBorder(
          image,
          *self._pads,
          self.border_mode,
          value=self.fill_value,
      )
      mask = cv2.copyMakeBorder(
          mask,
          *self._pads,
          self.border_mode,
          value=self.fill_value,
      )
      return image, mask
  
imports: import torch
  from numpy import ndarray
  from torch import Tensor
  from typing import Tuple
  from collections import namedtuple
label_desc: Use image node_id 2 for calling the PadToDivisor obj's underlying member method code with example usage: obj.transform(image, mask) and returns: image,  mask