<｜begin▁of▁sentence｜>### Instruction:
As a radiologic technologist, you are tasked with creating diagnostic images using medical imaging equipment such as X-ray machines, CT scanners, MRI scanners, or ultrasound machines to produce images of internal body structures, organs, tissues, or bones. In a particular scenario, imagine you need to capture an image of a blue rectangle using a specialized imaging tool. You'll need to position the equipment, adjust settings, and capture the image to ensure the quality and accuracy of the imaging results. Once captured, the image can then be saved or printed for further analysis or documentation.
### Response:
import cairo

# Create a surface to draw on
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 560, 240)
context = cairo.Context(surface)

# Draw a blue rectangle
context.set_source_rgb(0, 0, 1)
context.rectangle(120, 60, 320, 120)
context.fill()

# Save the result to an image file
surface.write_to_png('rectangle.png')
<|EOT|>
