class_docstr: A subgraph sampler used to sample a subgraph from a given set of nodes
  from a larger graph.
  
  Functional name: :obj:`sample_subgraph`.
  
  This class is the base class of all subgraph samplers. Any subclass of
  SubgraphSampler should implement the :meth:`sample_subgraphs` method.
  
  Parameters
  ----------
  datapipe : DataPipe
      The datapipe.
code: def __init__(
      self,
      datapipe,
  ):
      super().__init__(datapipe, self._sample)
  
file_path: dgl/python/dgl/graphbolt/subgraph_sampler.py
imports: from collections import defaultdict
  from typing import Dict
  from torch.utils.data import functional_datapipe
  from .base import etype_str_to_tuple
  from .internal import compact_temporal_nodes, unique_and_compact
  from .minibatch_transformer import MiniBatchTransformer
label_desc: Use image node_id 1 to create a new SubgraphSampler object from inherited base classes: MiniBatchTransformer with example: obj = SubgraphSampler(datapipe)