code: def calculate_text_coords(rectangle_coords):
          
          return (int(rectangle_coords[0] + (rectangle_coords[2] - rectangle_coords[0]) / 2),
                  int(rectangle_coords[1] + (rectangle_coords[3] - rectangle_coords[1]) / 2))
docs: Calculate Canvas text coordinates based on rectangle coords