<｜begin▁of▁sentence｜>### Instruction:
Given a Cairo graphics context, how can you use RectangleDrawer to draw a rectangle path on the context, centered at (100, 50) with width 120 and height 60, and then stroke it with green color?
### Response:
from igraph.drawing.shapes import RectangleDrawer
import cairo

# Create a surface and context to draw on
canvas = cairo.ImageSurface(cairo.FORMAT_ARGB32, 200, 100)
context = cairo.Context(canvas)

# Initialize the RectangleDrawer with the context
rect_drawer = RectangleDrawer(context)

# Draw a rectangle path with width 120, height 60, centered at (100, 50)
rect_drawer.draw_path(center_x=100, center_y=50, width=120, height=60)

# Optionally, you can stroke or fill the path
color = (0.2, 0.8, 0.2) # RGBA green
color = color + (1,)  # Adding alpha channel
context.set_source_rgba(*color)
context.stroke()  # Or use context.fill() to fill the rectangle

canvas.write_to_png('rectangle.png')  # Save the drawing to a file
<|EOT|>
