code: def _locate_eids_to_exclude(frontier_parent_eids, exclude_eids):
      """Find the edges whose IDs in parent graph appeared in exclude_eids.
  
      Note that both arguments are numpy arrays or numpy dicts.
      """
      if not isinstance(frontier_parent_eids, Mapping):
          return np.isin(frontier_parent_eids, exclude_eids).nonzero()[
              0
          ]
      result = {}
      for k, v in frontier_parent_eids.items():
          if k in exclude_eids:
              result[k] = np.isin(v, exclude_eids[k]).nonzero()[0]
      return recursive_apply(result, F.zerocopy_from_numpy)
  
file_path: dgl/python/dgl/sampling/utils.py
imports: from collections.abc import Mapping
  import numpy
  from ..None import backend, transforms, utils
  from ..base import EID
  from ..utils import recursive_apply, recursive_apply_pair
label_desc: Use image node_id 1 for calling a global function with example usage: _locate_eids_to_exclude(frontier_parent_eids, exclude_eids) and returns: recursive_apply, np