<｜begin▁of▁sentence｜>### Instruction:
Given a random network graph G with 100 nodes generated using the Erdos-Renyi model with edge probability of 0.05, can you use networkx to obtain a 4-dimensional spectral embedding of the graph, label the nodes randomly with 'Group 1' or 'Group 2', and then produce a pairwise scatterplot with graspologic's pairplot function? Display the plot.
### Response:
import numpy as np
import networkx as nx
from graspologic.plot import pairplot
import matplotlib.pyplot as plt

# Generate a random graph
G = nx.erdos_renyi_graph(n=100, p=0.05)

# Get the adjacency matrix
adj_matrix = nx.to_numpy_array(G)

# Perform spectral embedding
embedding = nx.spectral_layout(G, dim=4)

# Convert embedding to suitable numpy array shape
X = np.array(list(embedding.values()))

# Generate random labels
labels = np.random.choice(['Group 1', 'Group 2'], size=100)

# Plot pairwise relationships
pairplot(X, labels=labels)
plt.show()
<|EOT|>
