<｜begin▁of▁sentence｜>### Instruction:
Given a graph with the edge set [(1, 2), (2, 3), (3, 1)], how can you use NetworkX to create the incidence matrix for this graph, considering an unoriented incidence matrix where each edge weight is 1 by default?
### Response:
import networkx as nx

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

# Generate incidence matrix
inc_matrix = nx.incidence_matrix(G, nodelist=[1, 2, 3], edgelist=[(1, 2), (2, 3), (3, 1)], oriented=False)

print(inc_matrix.toarray())
<|EOT|>
