code: def paga_degrees(adata) -> List[int]:
      
      import networkx as nx
      g = nx.Graph(adata.uns['paga']['connectivities'])
      degrees = [d for _, d in g.degree(weight='weight')]
      return degrees
docs: Compute the degree of each node in the abstracted graph.
  
      Parameters
      ----------
      adata : AnnData
          Annotated data matrix.
  
      Returns
      -------
      List of degrees for each node.