<｜begin▁of▁sentence｜>### Instruction:
Given a tree graph with 3 children per node and 2 levels, how can you initialize a Descartes coordinate system with a specific drawing area and coordinate bounds, then plot the graph with vertices colored based on their outdegree and save the result as a PNG image?
### Response:
from igraph import Graph, plot
from igraph.drawing import DescartesCoordinateSystem

# Create a new graph
g = Graph.Tree(3, 2)

# Define the drawing area ('bbox') in pixels, and the bounds of the coordinate system
bbox = (300, 300)
bounds = (0, 1, 0, 1)

# Create a Cairo context for drawing
context = cairo.Context(cairo.ImageSurface(cairo.FORMAT_ARGB32, *bbox))

# Initialize the Descartes coordinate system with the context, bbox, and bounds
coord_system = DescartesCoordinateSystem(context, bbox, bounds)

# Draw the graph
color_map = {0: 'red', 1: 'green', 2: 'blue'}
style = {'vertex_color': [color_map[min(v.outdegree(), 2)] for v in g.vs]}
plot(g, target=context, bbox=bbox, vertex_size=15, **style)

# Save to a file
context.get_target().write_to_png('output.png')
<|EOT|>
