code: def init():
      ax.clear()
      ax.scatter(*nodes.T, alpha=0.9, s=500, color=node_colors)
      for vizedge in edges:
          ax.plot(*vizedge.T, color="gray")
      ax.grid(False)
      ax.set_axis_off()
      for p in pos:
          ax.text(
              *pos[p],
              labels[p],
              size=14,
              horizontalalignment="center",
              verticalalignment="center",
          )
  
imports: import numpy
  import networkx
  import matplotlib.pyplot
  import matplotlib.colors
  from matplotlib import animation
label_desc: Use image node_id 1 for calling a global function with example usage: init() without return types