<｜begin▁of▁sentence｜>### Instruction:
A network researcher is performing an experiment to determine the common latent positions between two different social networks, with each network modeled as a stochastic block model graph. The graphs share the same set of 100 nodes distributed in two communities, but have different connectivity probabilities within and between communities. How can the researcher apply the Multiple Adjacency Spectral Embedding (MASE) model to extract a common embedding that captures the shared structure between these two networks?
### Response:
import numpy as np
import networkx as nx
from graspologic.embed import MultipleASE
from graspologic.simulations import sbm

# Simulate two stochastic block model graphs
n_communities = [50, 50]
p_matrix_1 = np.array([[0.5, 0.1],
                       [0.1, 0.5]])
p_matrix_2 = np.array([[0.3, 0.1],
                       [0.1, 0.3]])
G1 = sbm(n=n_communities, p=p_matrix_1)
G2 = sbm(n=n_communities, p=p_matrix_2)

# Embed the graphs using MASE
mase = MultipleASE(n_components=2)
graphs = [nx.to_numpy_array(G1), nx.to_numpy_array(G2)]
embeddings = mase.fit_transform(graphs)

# embeddings is a list of 2D arrays (here, two embeddings for our two graphs)
print('Embedding for graph 1:\n', embeddings[0])
print('Embedding for graph 2:\n', embeddings[1])
<|EOT|>
