<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph where vertices and edges are defined, can you calculate the outdegree of a specific vertex (e.g., vertex 0) using the Vertex.outdegree method in igraph?
### Response:
from igraph import Graph

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

# Get the outdegree of vertex 0
g_outdegree_vertex_0 = g.vs[0].outdegree()
print(f'Outdegree of vertex 0: {g_outdegree_vertex_0}')
<|EOT|>
