<｜begin▁of▁sentence｜>### Instruction:
Assuming you have a ring graph with 10 vertices, and you want to rotate its layout by 90 degrees, can you use the `transform` method in `Layout` from `igraph` to achieve this rotation, applying a custom function to rotate the layout?
### Response:
from igraph import Graph, Layout
import math

def rotate_layout(layout, angle_degrees):
    # Convert angle to radians
    angle_radians = math.radians(angle_degrees)
    # Define rotation function
    def rotate(point):
        x, y = point
        return (x*math.cos(angle_radians) - y*math.sin(angle_radians),
                x*math.sin(angle_radians) + y*math.cos(angle_radians))
    return layout.transform(rotate)

# Create a graph and layout
graph = Graph.Ring(10)
layout = graph.layout('ring')
# Rotate layout by 90 degrees
rotated_layout = rotate_layout(layout, 90)
# Display original and rotated layouts
print('Original:', layout)
print('Rotated:', rotated_layout)
<|EOT|>
