<｜begin▁of▁sentence｜>### Instruction:
As a speech therapist, you might be asked to assist a group of five children in a collaborative project. The children are creating a visual representation of a tree structure to showcase their teamwork. They are using a tool called igraph to lay out the branches and vertices of the tree on a digital canvas. Now, they have requested guidance on how to use the `transform` method within the `Layout` class to adjust the scale of their layout by a factor of 2.

You will need to define a transformation function that effectively scales the coordinates of the layout and apply this to the graphical representation they have created.
### Response:
from igraph import Graph, Layout

# Create a graph
g = Graph.Tree(5, 2) # Create a tree graph with 5 vertices and branching factor of 2

# Create a layout using the 'kk' algorithm
layout = g.layout('kk')

# Define a simple transformation function that scales the layout
def scale_layout(coords, scale_factor):
    return (coords[0] * scale_factor, coords[1] * scale_factor)

# Apply the transformation to the layout
layout.transform(scale_layout, scale_factor=2.0)

# Print the transformed layout coordinates
for point in layout.coords:
    print(point)
<|EOT|>
