code: def has_path(nodes, A, B):
      r
      x1 = np.intersect1d(nodes, A).size > 0
      x2 = np.intersect1d(nodes, B).size > 0
      return x1 and x2
docs: r"""Test if nodes from a breadth_first_order search lead from A to
      B.
  
      Parameters
      ----------
      nodes : array_like
          Nodes from breadth_first_oder_seatch
      A : array_like
          The set of educt states
      B : array_like
          The set of product states
  
      Returns
      -------
      has_path : boolean
          True if there exists a path, else False