<｜begin▁of▁sentence｜>### Instruction:
As a policy analyst examining the impact of public policy on transportation networks, I need to simulate a network with 10 nodes to understand how preferential attachment affects the formation of connections. I want to use the Barabási-Albert model to generate a graph where each new transportation hub connects to 2 existing hubs, representing the tendency for popular nodes to attract more links. This will help me gain insights into how transportation networks evolve and how new hubs influence the overall connectivity of the system.
### Response:
import igraph as ig

# Generate a graph based on the Barabási-Albert model
num_vertices = 10  # Number of vertices
num_edges = 2  # Number of edges to attach from a new node to existing nodes

# Create a Barabasi graph
ba_graph = ig.Graph.Barabasi(num_vertices, num_edges)

# Print summary of the graph
print(ba_graph.summary())
<|EOT|>
