def compute_in_degrees(digraph):
    """ Function that takes a directed
        graph digraph and computes the
        in-degrees for the nodes in the
        graph. """
    in_graph = {}
    for key, values in digraph.items():
        if not in_graph.get(key):
            in_graph[key] = 0
        for value in values:
            if in_graph.get(value):
                in_graph[value] += 1
            else:
                in_graph[value] = 1
    return in_graph