code: def sample(self, aug_g, seed_edges):
      g = self.g
      subgraphs = []
      # construct k-hop enclosing graph for each link
      for eid in seed_edges:
          src, dst = map(int, aug_g.find_edges(eid))
          # construct the enclosing graph
          visited, nodes, fringe = [
              np.unique([src, dst]) for _ in range(3)
          ]
          for _ in range(self.num_hops):
              if not self.directed:
                  _, fringe = g.out_edges(fringe)
              else:
                  _, out_neighbors = g.out_edges(fringe)
                  in_neighbors, _ = g.in_edges(fringe)
                  fringe = np.union1d(in_neighbors, out_neighbors)
              fringe = np.setdiff1d(fringe, visited)
              visited = np.union1d(visited, fringe)
              if self.sample_ratio < 1.0:
                  fringe = np.random.choice(
                      fringe,
                      int(self.sample_ratio * len(fringe)),
                      replace=False,
                  )
              if len(fringe) == 0:
                  break
              nodes = np.union1d(nodes, fringe)
          subg = g.subgraph(nodes, store_ids=True)
  
          # remove edges to predict
          edges_to_remove = [
              subg.edge_ids(s, t)
              for s, t in [(0, 1), (1, 0)]
              if subg.has_edges_between(s, t)
          ]
          subg.remove_edges(edges_to_remove)
          # add double radius node labeling
          subg.ndata["z"] = self._double_radius_node_labeling(
              subg.adj_external(scipy_fmt="csr")
          )
          subg_aug = subg.add_self_loop()
          if "weight" in subg.edata:
              subg_aug.edata["weight"][subg.num_edges() :] = torch.ones(
                  subg_aug.num_edges() - subg.num_edges()
              )
          subgraphs.append(subg_aug)
  
      subgraphs = dgl.batch(subgraphs)
      dgl.set_src_lazy_features(subg_aug, self.prefetch_node_feats)
      dgl.set_edge_lazy_features(subg_aug, self.prefetch_edge_feats)
  
      return subgraphs, aug_g.edata["y"][seed_edges]
  
imports: import argparse
  import math
  import os
  import random
  import sys
  import time
  import dgl
  import numpy
  import torch
  import torch.nn.functional
  from dgl.dataloading import DataLoader, Sampler
  from dgl.nn import GraphConv, SortPooling
  from dgl.sampling import global_uniform_negative_sampling
  from ogb.linkproppred import DglLinkPropPredDataset, Evaluator
  from scipy.sparse.csgraph import shortest_path
  from torch.nn import BCEWithLogitsLoss, Conv1d, Embedding, Linear, MaxPool1d, ModuleList
  from tqdm import tqdm
label_desc: Use image node_id 3 for calling the SealSampler obj's underlying member method code with example usage: obj.sample(aug_g, seed_edges) and returns: subgraphs,  aug_g