<｜begin▁of▁sentence｜>### Instruction:
A network scientist is interested in exploring the effects of correlation on network structure. They decide to generate a pair of Erdős-Rényi graphs with a correlation between their edge structures. The generated graphs have 10 nodes each with an edge probability of 0.2, and they share a correlation coefficient of 0.5. The graphs are undirected without self-loops. How can the scientist generate these graphs using the graspologic library, convert them into networkx graph objects, and subsequently analyze their basic properties?
### Response:
import numpy as np
from graspologic.simulations import er_corr

# Set random seed for reproducibility
np.random.seed(42)

# Define number of vertices and edge probability
n = 10
p = 0.2
r = 0.5

# Generate a pair of correlated ER graphs
G1, G2 = er_corr(n, p, r, directed=False, loops=False)

# Example usage in networkx to create a graph from the adjacency matrix
import networkx as nx
G1_graph = nx.from_numpy_array(G1)
G2_graph = nx.from_numpy_array(G2)

# Verify the number of nodes and edges in each graph
print('Graph G1 has', G1_graph.number_of_nodes(), 'nodes and', G1_graph.number_of_edges(), 'edges.')
print('Graph G2 has', G2_graph.number_of_nodes(), 'nodes and', G2_graph.number_of_edges(), 'edges.')
<|EOT|>
