code: def sample_adj(
      src: SparseTensor,
      subset: torch.Tensor,
      num_neighbors: int,
      replace: bool = False,
  ) -> Tuple[SparseTensor, torch.Tensor]:
      rowptr, col, value = src.csr()
  
      rowptr, col, n_id, e_id = torch.ops.torch_sparse.sample_adj(
          rowptr, col, subset, num_neighbors, replace
      )
  
      if value is not None:
          value = value[e_id]
  
      out = SparseTensor(
          rowptr=rowptr,
          row=None,
          col=col,
          value=value,
          sparse_sizes=(subset.size(0), n_id.size(0)),
          is_sorted=True,
      )
  
      return out, n_id
  
imports: from typing import Optional, Tuple
  import torch
  from torch_sparse.tensor import SparseTensor
label_desc: Use image node_id 2 for calling a global function with example usage: sample_adj(src, subset, num_neighbors, replace) and returns: out,  n_id