Just testing YouTube video embedding and code block snippets:
def count_out_degrees(adjacency_dict):
"""
Scan Value (edge) length for each Key (node) to
retrun outdegree(list)
"""
out_edges = defaultdict(int)
for node, edges in adjacency_dict.items():
# Additional check for an edge that has no out edge.
for edge in edges:
if edge not in out_edges:
out_edges[edge] = 0
# ---
out_edges[node] = len(edges)
return out_edges
Testing this: Awesome Text
.
Image Test: