code: def is_distance_regular(G):
      """Returns True if the graph is distance regular, False otherwise.
  
      A connected graph G is distance-regular if for any nodes x,y
      and any integers i,j=0,1,...,d (where d is the graph
      diameter), the number of vertices at distance i from x and
      distance j from y depends only on i,j and the graph distance
      between x and y, independently of the choice of x and y.
  
      Parameters
      ----------
      G: Networkx graph (undirected)
  
      Returns
      -------
      bool
        True if the graph is Distance Regular, False otherwise
  
      Examples
      --------
      >>> G = nx.hypercube_graph(6)
      >>> nx.is_distance_regular(G)
      True
  
      See Also
      --------
      intersection_array, global_parameters
  
      Notes
      -----
      For undirected and simple graphs only
  
      References
      ----------
      .. [1] Brouwer, A. E.; Cohen, A. M.; and Neumaier, A.
          Distance-Regular Graphs. New York: Springer-Verlag, 1989.
      .. [2] Weisstein, Eric W. "Distance-Regular Graph."
          http://mathworld.wolfram.com/Distance-RegularGraph.html
  
      """
      try:
          intersection_array(G)
          return True
      except nx.NetworkXError:
          return False
  
imports: import networkx
  from networkx.utils import not_implemented_for
  from .distance_measures import diameter
label_desc: Use image node_id 1 for calling a global function with example usage: is_distance_regular(G) and returns: True, False