code: def _find_exclude_eids_with_reverse_types(g, eids, reverse_etype_map):
      exclude_eids = {
          g.to_canonical_etype(k): v for k, v in eids.items()
      }
      reverse_etype_map = {
          g.to_canonical_etype(k): g.to_canonical_etype(v)
          for k, v in reverse_etype_map.items()
      }
      for k, v in reverse_etype_map.items():
          if k in exclude_eids:
              if v in exclude_eids:
                  exclude_eids[v] = F.unique(
                      F.cat((exclude_eids[k], exclude_eids[v]), dim=0)
                  )
              else:
                  exclude_eids[v] = exclude_eids[k]
      return exclude_eids
  
imports: import inspect
  from collections.abc import Mapping
  from ..None import backend
  from ..base import EID, NID
  from ..convert import heterograph
  from ..frame import LazyFeature
  from ..transforms import compact_graphs
  from ..utils import context_of, recursive_apply
label_desc: Use image node_id 7 for calling a global function with example usage: _find_exclude_eids_with_reverse_types(g, eids, reverse_etype_map) and returns: exclude_eids