code: def degree_dist(G):
      degree_sequence = sorted([d for n, d in G.degree()], reverse=True)
      degreeCount = collections.Counter(degree_sequence)
      deg, cnt = zip(*degreeCount.items())
  
      fig, ax = plt.subplots()
      plt.bar(deg, cnt, width=0.80, color="b")
  
      plt.title("Degree Histogram")
      plt.ylabel("Count")
      plt.xlabel("Degree")
      ax.set_xticks([d + 0.4 for d in deg])
      ax.set_xticklabels(deg)
      plt.show()
  
file_path: GraphGym/run/datasets/syn_graph.py
imports: import collections
  import os
  import pickle
  import matplotlib.pyplot
  import networkx
  import numpy
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: degree_dist(G) without return types