<｜begin▁of▁sentence｜>### Instruction:
As a business consultant, imagine you are advising a company that wants to optimize its supply chain operations. In this scenario, the directed graph represents the flow of goods from one location to another. The edges of the graph are defined as pairs, where the first element is the source location and the second is the destination location. Now, your task is to use the supply chain management software to find the predecessor locations of a specific destination location. Let's say we need to find the predecessor locations of the main distribution center, which is designated as "Location 1" in the system. This will help the company understand which locations contribute to the flow of goods into the main distribution center.
### Response:
from igraph import Graph, Vertex

# Creating a simple directed graph
edges = [(0, 1), (0, 2), (2, 3), (3, 1)]
g = Graph(edges=edges, directed=True)

# Accessing a vertex and getting its predecessors
vertex_id = 1
vertex = g.vs[vertex_id]
predecessors = vertex.predecessors()

# Printing the ids of the predecessor vertices
print('Predecessors of Vertex {}:'.format(vertex_id), predecessors)
<|EOT|>
