code: def _center_tile(self, position, size):
          x, y = position
          w, h = size
          
          return x + (self.cell_width - w) / 2, y + (self.cell_height - h) / 2
docs: Calculate the centre of a tile given the top-left corner and the size of the image.