<｜begin▁of▁sentence｜>### Instruction:
Given two partitions with degree sequences [3, 2, 1] and [1, 2, 2, 1], can you use the Realize_Bipartite_Degree_Sequence function in igraph to generate a bipartite graph?
### Response:
from igraph import Graph

# Degree sequences for two partitions
partition1_degrees = [3, 2, 1]
partition2_degrees = [1, 2, 2, 1]

# Generate the bipartite graph
g = Graph.Bipartite(partition1_degrees, partition2_degrees, method='igraph')
print(g)
<|EOT|>
