<｜begin▁of▁sentence｜>### Instruction:
As a speech pathologist, you might have a scenario where you are working with a group of individuals of varying ages who have different communication needs. For instance, you may have a group consisting of 10 children, 15 teenagers, and 20 adults. You are interested in analyzing the connections and communication patterns within this group. You have collected data on the probability of communication between each pair of age groups, represented as a matrix of connection probabilities. Now you are looking to use the Stochastic Block Model (SBM) function in the igraph library to generate a graph that can help you understand the communication dynamics within this diverse group.
### Response:
from igraph import Graph

# Define the block sizes and the matrix of connection probabilities
block_sizes = [10, 15, 20]
connection_probs = [[0.5, 0.05, 0.02], [0.05, 0.4, 0.07], [0.02, 0.07, 0.3]]

# Generate a stochastic block model graph
g = Graph.SBM(n=sum(block_sizes), block_sizes=block_sizes, p=connection_probs)

# Print the summary to check the graph
g.summary()
<|EOT|>
