I want to find reciprocal links in the graph up to a certain collusion level (length of link path from A to B). How do I count each recursive call and terminate the assignment once the count reaches the parameter k?

Inputs: 

• graph: g = {a : [a, b, c], b : [a], c : [d], d : [a]}

• page: element in graph[node]

• node: key in graph

• k: collusion level (i.e. max length of a link path)

```
def is_reciprocal(graph, page, node, k):
    if page in graph[node]:
        return True
    else:
        is_reciprocal(graph, node, page, k)

```