code: def IsRegularGraph(topo: nx.DiGraph) -> bool:
      """Dtermine a graph is regular or not, i.e. all nodes have the same degree."""
      degree = topo.degree(0)
      for rank in range(1, topo.number_of_nodes()):
          if topo.degree(rank) != degree:
              return False
      return True
  
imports: from typing import List, Tuple, Dict, Iterator, Optional
  import math
  import numpy
  import networkx
label_desc: Use image node_id 12 for calling a global function with example usage: IsRegularGraph(topo) and returns: True, False