class_docstr: Paste the image onto the center of a background canvas.
class_docstr_tok: ["Paste","the","image","onto","the","center","of","a","background","canvas","."]
code: def _impl(self, img):
      img_shape = img.shape[:2]
      assert (
          self.background_shape[0] >= img_shape[0]
          and self.background_shape[1] >= img_shape[1]
      )
  
      background = self.background_filler.fill(
          self.background_shape, img
      )
      y0 = int((self.background_shape[0] - img_shape[0]) * 0.5)
      x0 = int((self.background_shape[1] - img_shape[1]) * 0.5)
      background[y0 : y0 + img_shape[0], x0 : x0 + img_shape[1]] = img
      return background
  
imports: import numpy
  from abc import abstractmethod
  from .base import ImageAugmentor
  from .transform import TransformFactory
label_desc: Use image node_id 3 for calling the CenterPaste obj's underlying member method code with example usage: obj._impl(img) and returns: background