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.
docstr: Sample subgraphs from the given seeds, possibly with temporal constraints.
  
  Any subclass of SubgraphSampler should implement this method.
  
  Parameters
  ----------
  seeds : Union[torch.Tensor, Dict[str, torch.Tensor]]
      The seed nodes.
  
  seeds_timestamp : Union[torch.Tensor, Dict[str, torch.Tensor]]
      The timestamps of the seed nodes. If given, the sampled subgraphs
      should not contain any nodes or edges that are newer than the
      timestamps of the seed nodes. Default: None.
  
  Returns
  -------
  Union[torch.Tensor, Dict[str, torch.Tensor]]
      The input nodes.
  List[SampledSubgraph]
      The sampled subgraphs.
  
  Examples
  --------
  >>> @functional_datapipe("my_sample_subgraph")
  >>> class MySubgraphSampler(SubgraphSampler):
  >>>     def __init__(self, datapipe, graph, fanouts):
  >>>         super().__init__(datapipe)
  >>>         self.graph = graph
  >>>         self.fanouts = fanouts
  >>>     def sample_subgraphs(self, seeds):
  >>>         # Sample subgraphs from the given seeds.
  >>>         subgraphs = []
  >>>         subgraphs_nodes = []
  >>>         for fanout in reversed(self.fanouts):
  >>>             subgraph = self.graph.sample_neighbors(seeds, fanout)
  >>>             subgraphs.insert(0, subgraph)
  >>>             subgraphs_nodes.append(subgraph.nodes)
  >>>             seeds = subgraph.nodes
  >>>         subgraphs_nodes = torch.unique(torch.cat(subgraphs_nodes))
  >>>         return subgraphs_nodes, subgraphs
code: def sample_subgraphs(self, seeds, seeds_timestamp):
      """Sample subgraphs from the given seeds, possibly with temporal constraints.
  
      Any subclass of SubgraphSampler should implement this method.
  
      Parameters
      ----------
      seeds : Union[torch.Tensor, Dict[str, torch.Tensor]]
          The seed nodes.
  
      seeds_timestamp : Union[torch.Tensor, Dict[str, torch.Tensor]]
          The timestamps of the seed nodes. If given, the sampled subgraphs
          should not contain any nodes or edges that are newer than the
          timestamps of the seed nodes. Default: None.
  
      Returns
      -------
      Union[torch.Tensor, Dict[str, torch.Tensor]]
          The input nodes.
      List[SampledSubgraph]
          The sampled subgraphs.
  
      Examples
      --------
      >>> @functional_datapipe("my_sample_subgraph")
      >>> class MySubgraphSampler(SubgraphSampler):
      >>>     def __init__(self, datapipe, graph, fanouts):
      >>>         super().__init__(datapipe)
      >>>         self.graph = graph
      >>>         self.fanouts = fanouts
      >>>     def sample_subgraphs(self, seeds):
      >>>         # Sample subgraphs from the given seeds.
      >>>         subgraphs = []
      >>>         subgraphs_nodes = []
      >>>         for fanout in reversed(self.fanouts):
      >>>             subgraph = self.graph.sample_neighbors(seeds, fanout)
      >>>             subgraphs.insert(0, subgraph)
      >>>             subgraphs_nodes.append(subgraph.nodes)
      >>>             seeds = subgraph.nodes
      >>>         subgraphs_nodes = torch.unique(torch.cat(subgraphs_nodes))
      >>>         return subgraphs_nodes, subgraphs
      """
      raise NotImplementedError
  
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 4 for calling the SubgraphSampler obj's underlying member method code with example usage: obj.sample_subgraphs(seeds, seeds_timestamp) without return types