code: def degree_histogram(G, t=None):
      
      counts = Counter(d for n, d in G.degree(t=t).items())
      return [counts.get(i, 0) for i in range(max(counts) + 1)]
docs: Return a list of the frequency of each degree value.
  
          Parameters
          ----------
  
          G : Graph opject
              DyNetx graph object
  
  
          t : snapshot id (default=None)
              snapshot id
  
  
          Returns
          -------
          hist : list
             A list of frequencies of degrees.
             The degree values are the index in the list.
  
          Notes
          -----
          Note: the bins are width one, hence len(list) can be large
          (Order(number_of_edges))