<｜begin▁of▁sentence｜>### Instruction:
Given a graph with edge set [(0, 1), (0, 2), (1, 2), (2, 3), (3, 0)], how can you calculate the average degree of the neighbors for each vertex using the knn function in igraph, and what is the structure of the results?
### Response:
from igraph import Graph

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

# Calculate average degree of the neighbors for each vertex
deegree, ave_deg = g.knn()

print(deegree)
print(ave_deg)
<|EOT|>
