code: def IsTopologyEquivalent(
      topo1: nx.DiGraph, topo2: nx.DiGraph
  ) -> bool:
      """Determine two topologies are equivalent or not.
  
      Notice we do not check two topologies are isomorphism. Instead checking
      the adjacenty matrix is the same only.
      """
      if topo1 is None or topo2 is None:
          return False
      if topo1.number_of_nodes() != topo2.number_of_nodes():
          return False
      if topo1.number_of_edges() != topo2.number_of_edges():
          return False
      A1 = nx.to_numpy_matrix(topo1).ravel()
      A2 = nx.to_numpy_matrix(topo2).ravel()
      return (A1 == A2).all()
  
imports: from typing import List, Tuple, Dict, Iterator, Optional
  import math
  import numpy
  import networkx
label_desc: Use image node_id 1 for calling a global function with example usage: IsTopologyEquivalent(topo1, topo2) and returns: unknown, False, False, False