code: def SymmetricExponentialGraph(size: int, base: int = 4) -> nx.DiGraph:
      """
       Generate symmeteric graph topology such that for the first half of nodes
       only connected to a point such that the index difference is power of base (Default is 4)
       and the connectivity for the second half of nodes just mirrored to the first half.
  
      Example: A SymmetricExponentialGraph with 12 nodes
  
      .. plot::
          :context: close-figs
  
          >>> import networkx as nx
          >>> from bluefog.common import topology_util
          >>> G = topology_util.SymmetricExponentialGraph(12)
          >>> nx.draw_circular(G)
      """
      x = [1.0]
      for i in range(1, size):
          index = i if i <= size // 2 else size - i
          if isPowerOf(index, base):
              x.append(1.0)
          else:
              x.append(0.0)
      x = np.array(x)
      x /= x.sum()
      topo = np.empty((size, size))
      for i in range(size):
          topo[i] = np.roll(x, i)
      G = nx.from_numpy_array(topo, create_using=nx.DiGraph)
      return G
  
imports: from typing import List, Tuple, Dict, Iterator, Optional
  import math
  import numpy
  import networkx
label_desc: Use image node_id 7 for calling a global function with example usage: SymmetricExponentialGraph(size, base) and returns: G