<｜begin▁of▁sentence｜>### Instruction:
Given a graph with nodes [1, 2, 3, 4] and edges [(1, 2), (1, 3), (3, 4)], find the neighbors of node 1.
### Response:
import networkx as nx

# Create a graph
G = nx.Graph()

# Add nodes to the graph
G.add_nodes_from([1, 2, 3, 4])

# Add edges to the graph
G.add_edges_from([(1, 2), (1, 3), (3, 4)])

# Get neighbors of node 1
neighbors_list = list(G.neighbors(1))

print('Neighbors of node 1:', neighbors_list)
<|EOT|>
