I have a graph and I would like to calculate for each node the degree of its parent nodes.
Here is a figure as example,
In this example, the degree of node-9 would be 9, 5 connections from node-19 and 4 connections from node-3; and for node-5 it would be 3, since its parent node-13 has 3 connections.
I want to calculate the degree starting for one node (for example node-19) and calculate the degree based on parents for nodes 2, and 3 steps away from node-19.
I was thinking in using the function ego but it also gives me the parents of the parents in step 2, and 3.
Any help?
