docs: def generate_unit_squares(image_width, image_height):
      """Generate coordinates for a tiling of unit squares."""
      # Iterate over the required rows and cells.  The for loops (x, y)
      # give the coordinates of the top left-hand corner of each square:
      #
      #      (x, y) +-----+ (x + 1, y)
      #             |     |
      #             |     |
      #             |     |
      #  (x, y + 1) +-----+ (x + 1, y + 1)
      #
      for x in range(image_width):
          for y in range(image_height):
              yield [(x, y), (x + 1, y), (x + 1, y + 1), (x, y + 1)]