def nodes_degree(edges_gdf):
    """
    It returns a dictionary where keys are nodes identifier (e.g. "nodeID") and values their degree.
    
    Parameters
    ----------
    edges_gdf: LineString GeoDataFrame
        street segments GeoDataFrame
    
    Returns
    -------
    dd: dictionary
        a dictionary where each item consists of a nodeID (key) and degree values (values)
    """

    dd_u = dict(edges_gdf['u'].value_counts())
    dd_v = dict(edges_gdf['v'].value_counts())
    dd = {k: dd_u.get(k, 0) + dd_v.get(k, 0) for k in set(dd_u) | set(dd_v)}
    return dd