<｜begin▁of▁sentence｜>### Instruction:
Given a graph with edges (1, 2), (2, 3), (3, 4) and a matching consisting of a single edge (2, 3), can you use NetworkX's is_maximal_matching function to determine if the matching is maximal?
### Response:
from networkx.algorithms.matching import is_maximal_matching
import networkx as nx

# Create a graph
G = nx.Graph()
G.add_edges_from([(1, 2), (2, 3), (3, 4)])

# Define a set of edges that form a matching
matching = {(2, 3)}

# Check if the matching is maximal
is_maximal = is_maximal_matching(G, matching)
print('Is the matching maximal?', is_maximal)
<|EOT|>
