def _proportion(graph, degree):
    """
    Calculates the proportion of intersection types in a graph.
    """
    import collections
    values = list(dict(graph.nodes(degree)).values())
    counts = collections.Counter(values)
    return counts
