<｜begin▁of▁sentence｜>### Instruction:
Given a complete graph with 9 vertices, how do you use igraph's layout_grid function to position vertices in a 3x3 grid for a 2D visualization?
### Response:
from igraph import Graph

# Create a simple graph with 9 vertices
g = Graph.Full(9)

# Use the layout_grid function to place vertices in a 2x2 grid
layout = g.layout_grid(width=3, dim=2)

# Print the layout coordinates
for idx, coord in enumerate(layout):
    print(f'Vertex {idx}: {coord}')
<|EOT|>
