code: def rectangle(self, x, y, width, height, corner_radius = 0):
          
          if corner_radius <= 0:
              self._add_instruction("rectangle", x, y, width, height)
              return
  
          # convert into 4 border and  make sure that w + h are larger than 2 * corner_radius
          if isinstance(corner_radius, (int, float)):
              corner_radius = [corner_radius] * 4
          corner_radius = [min(r, min(width, height) / 2) for r in corner_radius]
  
          x2, y2 = x + width, y + height
          self._rounded_rectangle(x, y, x2, y2, corner_radius)
docs: draw a rectangle. if corner_radius is specified, will draw
          rounded corners. corner_radius can be either a number or a tuple of
          four items to specify individually each corner, starting from top-left
          and going clockwise