<｜begin▁of▁sentence｜>### Instruction:
Given a directed igraph graph, can you use the predecessors method to find and print the predecessors of vertex 2?
### Response:
import igraph as ig

# Create a graph
g = ig.Graph(directed=True)
g.add_vertices(3)
g.add_edges([(0,1), (1,2)])

# Get the predecessors of vertex 2
predecessors = g.predecessors(2)

print(predecessors)
<|EOT|>
