code: def get_stretched_image(self, stretch_factor):
      stretch_factor = max(stretch_factor, 1)
      ny, nx, nch = self.im.shape
      ny2 = int(ny * stretch_factor)
      return np.vstack(
          [
              self.im[: self.cut_location],
              np.broadcast_to(
                  self.im[self.cut_location], (ny2 - ny, nx, nch)
              ),
              self.im[self.cut_location :],
          ]
      )
  
file_path: matplotlib/galleries/examples/misc/demo_ribbon_box.py
imports: import matplotlib.pyplot
  import numpy
  from matplotlib import cbook
  from matplotlib import colors
  from matplotlib.image import AxesImage
  from matplotlib.transforms import Bbox, BboxTransformTo, TransformedBbox
label_desc: Use image node_id 2 for calling the RibbonBox obj's underlying member method code with example usage: obj.get_stretched_image(stretch_factor) and returns: np