<｜begin▁of▁sentence｜>### Instruction:
Given a dictionary of positions keyed by node, where node 0 is at (0, 0), node 1 is at (1, 1), and node 2 is at (0.5, 0.5), how can you rescale the positions by a factor of 2 using NetworkX's 'rescale_layout_dict' function?
### Response:
import networkx as nx
import numpy as np

pos = {
0: np.array((0, 0)),
1: np.array((1, 1)),
2: np.array((0.5, 0.5))
}

scaled_pos = nx.rescale_layout_dict(pos, scale=2)
print(scaled_pos)
<|EOT|>
