<｜begin▁of▁sentence｜>### Instruction:
Given two Erdős-Rényi graphs with 100 nodes each and a connection probability of 0.5, can you use the OmnibusEmbed function (in graspologic) to embed both graphs together and extract their latent positions?
### Response:
import networkx as nx
from graspologic.embed import OmnibusEmbed

# Create a list of graph adjacency matrices/graphs
G1 = nx.erdos_renyi_graph(100, 0.5)
G2 = nx.erdos_renyi_graph(100, 0.5)

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

# Instantiate OmnibusEmbed
omni = OmnibusEmbed(n_components=3, n_elbows=2)

# Fit and transform the graphs
omni_embedding = omni.fit_transform([A1, A2])

print(f'Embedding shape: {omni_embedding[0].shape}')
print(f'Omnibus embedding of first graph:\n{omni_embedding[0]}')
print(f'Omnibus embedding of second graph:\n{omni_embedding[1]}')
<|EOT|>
