<｜begin▁of▁sentence｜>### Instruction:
Given a graph, can you use Layout.Layout.rotate in igraph to rotate the layout of a graph by 90 degrees in a 2D plane?
### Response:
from igraph import Graph, Layout

# Creating a simple graph
g = Graph.Tree(6, 2)

# Creating a layout
layout = g.layout('kk')  # Kamada-Kawai layout to spread out nodes

# Rotate the layout by 90 degrees around the Z axis (2D rotation)
layout.rotate(90, dim1=0, dim2=1)

# Print the new coordinates of the nodes after rotation
for coord in layout.coords:
    print(coord)
<|EOT|>
