code: def to_aperture(self):
          
  
          from .rectangle import RectangularAperture
  
          xpos = (self.extent[1] + self.extent[0]) / 2.
          ypos = (self.extent[3] + self.extent[2]) / 2.
          xypos = (xpos, ypos)
          h, w = self.shape
  
          return RectangularAperture(xypos, w=w, h=h, theta=0.)
docs: Return a `~photutils.aperture.RectangularAperture` that
          represents the bounding box.