<｜begin▁of▁sentence｜>### Instruction:
{'description': "Given an edge list containing the pairs ('A', 'B'), ('B', 'C'), and ('C', 'D'), use the NetworkX pairwise utility function to convert it into a list of tuples where each tuple contains two consecutive edges in the form ((edge1), (edge2)).", 'data': "The edge list [('A', 'B'), ('B', 'C'), ('C', 'D')].", 'problem': 'To transform the edge list into a pairwise format such that each element in the new list represents two consecutive edges, providing a list of tuples as output.'}
### Response:
import networkx as nx
edges = [('A', 'B'), ('B', 'C'), ('C', 'D')]
# Convert the edge list to a pairwise tuple format
pairwise_edges = list(nx.utils.pairwise(edges))
print(pairwise_edges)
<|EOT|>
