<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def paga_degrees(adata) -> List[int]: """Compute the degree of each node in the abstracted graph. Parameters adata : AnnData Annotated data matrix. Returns ------- List of degrees for each node. """

    import networkx as nx
    g = nx.Graph(adata.uns['paga']['connectivities'])
    degrees = [d for _, d in g.degree(weight='weight')]
    return degrees