<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph where the edges are defined by a list of tuples [(1, 2), (1, 3), (3, 4)], how can you list the successors of the vertex 1 using NetworkX?
### Response:
import networkx as nx

# Create a directed graph
dg = nx.DiGraph()
dg.add_edges_from([(1, 2), (1, 3), (3, 4)])

# Get the successors of vertex 1
successors_of_1 = list(dg.successors(1))

print('Successors of vertex 1:', successors_of_1)
<|EOT|>
