<｜begin▁of▁sentence｜>### Instruction:
Given an undirected weighted network graph where nodes represent individuals and edges represent the strength of their relationships, how can we represent this social network in a lower-dimensional space to uncover underlying structural patterns using the adjacency spectral embedding method from graspologic?
### Response:
import networkx as nx
from graspologic.pipeline import embed

# Create a synthetic weighted undirected graph
G = nx.Graph()
G.add_edge('A', 'B', weight=1)
G.add_edge('A', 'C', weight=3)
G.add_edge('B', 'C', weight=2)
G.add_edge('C', 'D', weight=4)

# Perform adjacency spectral embedding
embeddings = embed.adjacency_spectral_embedding(
    graph=G,
    dimensions=2,
    elbow_cut=None,
    svd_solver_algorithm='randomized',
    svd_solver_iterations=5,
    svd_seed=None,
    weight_attribute='weight'
)

print('Embeddings:\n', embeddings)
<|EOT|>
