<｜begin▁of▁sentence｜>### Instruction:
As a networkx expert, you may encounter scenarios where you need to visualize network structures and analyze graph data. In this case, you can use the `nx.draw` function to create a visual representation of the graph. The `nx.draw` function allows you to customize the appearance of the graph by specifying parameters such as node color, node size, edge color, and layout. By utilizing these features, you can effectively communicate key insights about the network structure and relationships.
### 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|>
