code: def _relabel_two_arrays(lhs_array, rhs_array):
      """Relabel two arrays into a consecutive range starting from 0."""
      concated = torch.cat([lhs_array, rhs_array])
      _, mapping = torch.unique(concated, return_inverse=True)
      return mapping[: lhs_array.numel()], mapping[lhs_array.numel() :]
  
file_path: dgl/python/dgl/graphbolt/sampled_subgraph.py
imports: from typing import Dict, Tuple, Union
  import torch
  from dgl.utils import recursive_apply
  from .base import apply_to, CSCFormatBase, etype_str_to_tuple, isin
label_desc: Use image node_id 2 for calling a global function with example usage: _relabel_two_arrays(lhs_array, rhs_array) and returns: mapping,  mapping