def streets_per_node(G: nx.MultiDiGraph) -> dict[int, int]:
    """
    Retrieve nodes' `street_count` attribute values.

    See also the `count_streets_per_node` function for the calculation.

    Parameters
    ----------
    G
        Input graph.

    Returns
    -------
    spn
        Dictionary with node ID keys and street count values.
    """
    # ensure each count value has type int (otherwise could be type np.int64)
    # if user has projected the graph bc GeoDataFrames use np.int64 for ints
    spn = {k: int(v) for k, v in nx.get_node_attributes(G, "street_count").items()}
    if set(spn) != set(G.nodes):
        msg = "Graph nodes changed since `street_count`s were calculated"
        utils.log(msg, level=lg.WARNING)
    return spn

    Retrieve nodes' `street_count` attribute values.

    See also the `count_streets_per_node` function for the calculation.

    Parameters
    ----------
    G
        Input graph.

    Returns
    -------
    spn
        Dictionary with node ID keys and street count values.
    
osmnx/stats.py