code: def _to_reverse_ids(
      node_pair, original_row_node_ids, original_column_node_ids
  ):
      indptr = node_pair.indptr
      indices = node_pair.indices
      if original_row_node_ids is not None:
          indices = torch.index_select(
              original_row_node_ids, dim=0, index=indices
          )
      if original_column_node_ids is not None:
          indptr = original_column_node_ids.repeat_interleave(
              indptr.diff()
          )
      else:
          indptr = torch.arange(len(indptr) - 1).repeat_interleave(
              indptr.diff()
          )
      return (indices, indptr)
  
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 1 for calling a global function with example usage: _to_reverse_ids(node_pair, original_row_node_ids, original_column_node_ids) and returns: indices,  indptr