class_docstr: The GraphSAINT edge sampler class (see
  :class:`~torch_geometric.loader.GraphSAINTSampler`).
code: def _sample_nodes(self, batch_size):
      row, col, _ = self.adj.coo()
  
      deg_in = 1.0 / self.adj.storage.colcount()
      deg_out = 1.0 / self.adj.storage.rowcount()
      prob = (1.0 / deg_in[row]) + (1.0 / deg_out[col])
  
      # Parallel multinomial sampling (without replacement)
      # https://github.com/pytorch/pytorch/issues/11931#issuecomment-625882503
      rand = torch.rand(batch_size, self.E).log() / (prob + 1e-10)
      edge_sample = rand.topk(self.batch_size, dim=-1).indices
  
      source_node_sample = col[edge_sample]
      target_node_sample = row[edge_sample]
  
      return torch.cat([source_node_sample, target_node_sample], -1)
  
imports: import os.path
  from typing import Optional
  import torch
  from tqdm import tqdm
  from torch_geometric.typing import SparseTensor
label_desc: Use image node_id 1 for calling the GraphSAINTEdgeSampler obj's underlying member method code with example usage: obj._sample_nodes(batch_size) and returns: torch