<｜begin▁of▁sentence｜>### Instruction:
Given a graph with edge set [(1, 2), (2, 3), (3, 4), (4, 1)], how would you draw the graph using NetworkX and Matplotlib?
### Response:
import matplotlib.pyplot as plt
import networkx as nx

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

# Draw the graph
nx.draw_networkx(G)

# Display the graph
plt.show()
<|EOT|>
