<｜begin▁of▁sentence｜>### Instruction:
A data scientist wants to compare the structures of different social networks and look for common latent positions across these networks. Several graphs are available, each representing social interactions within a different context (e.g., work, school, social media). The goal is to use Omnibus Embedding to embed the adjacency matrices of these graphs into a common space, allowing for comparison across different social contexts.
### Response:
import networkx as nx
from graspologic.embed import OmnibusEmbed
import numpy as np

# Generate two random graphs G1 and G2 with 10 nodes
n = 10
p = 0.5
G1 = nx.erdos_renyi_graph(n, p)
G2 = nx.erdos_renyi_graph(n, p)

# Convert NetworkX graphs to adjacency matrices
A1 = nx.to_numpy_array(G1)
A2 = nx.to_numpy_array(G2)

# List of adjacency matrices
graphs = [A1, A2]

# Instantiate OmnibusEmbed object
embedder = OmnibusEmbed(n_components=2, n_elbows=2, algorithm='randomized', n_iter=5, check_lcc=True)

# Fit the model and get the embedded coordinates
omnibus_embedding = embedder.fit_transform(graphs)

# omnibus_embedding is an (n, n_components) ndarray
# Each row corresponds to the omnibus embedding of a node
print(omnibus_embedding)
<|EOT|>
