docs: def concentric_rectangle_path(size):
      """
      Creates a generator for progressing through an image
      :param size: A tuple (width, height) of the image size
      :return: A generator that yields a set of rows through the image.
      Each row is a generator that yields pixel coordinates.
      """
  
      def conc_rect_iter():
          for x in range(min_x, max_x):
              yield (x, min_y)
          # if rectangle only has height of 1, prevent path from doubling back along x
          if min_y + 1 == max_y:
              return
          for y in range(min_y + 1, max_y):
              yield (max_x - 1, y)
          for x in range(max_x - 2, min_x - 1, -1):
              yield (x, max_y - 1)
          for y in range(max_y - 2, min_y, -1):
              yield (min_x, y)
  
      width, height = size
      min_x, max_x = 0, width
      min_y, max_y = 0, height
  
      while min_x < max_x and min_y < max_y:
          yield conc_rect_iter()
  
          min_x += 1
          min_y += 1
          max_x -= 1
          max_y -= 1