class_docstr: Base class for sampling mini-batches in the form of Message-passing
  Flow Graphs (MFGs).
  
  It provides prefetching options to fetch the node features for the first MFG's ``srcdata``,
  the node labels for the last MFG's ``dstdata`` and the edge features of all MFG's ``edata``.
  
  Parameters
  ----------
  prefetch_node_feats : list[str] or dict[str, list[str]], optional
      The node data to prefetch for the first MFG.
  
      DGL will populate the first layer's MFG's ``srcnodes`` and ``srcdata`` with
      the node data of the given names from the original graph.
  prefetch_labels : list[str] or dict[str, list[str]], optional
      The node data to prefetch for the last MFG.
  
      DGL will populate the last layer's MFG's ``dstnodes`` and ``dstdata`` with
      the node data of the given names from the original graph.
  prefetch_edge_feats : list[str] or dict[etype, list[str]], optional
      The edge data names to prefetch for all the MFGs.
  
      DGL will populate every MFG's ``edges`` and ``edata`` with the edge data
      of the given names from the original graph.
  output_device : device, optional
      The device of the output subgraphs or MFGs.  Default is the same as the
      minibatch of seed nodes.
class_docstr_tok: ["Base","class","for","sampling","mini-batches","in","the","form","of","Message-passing","Flow","Graphs","(","MFGs",")",".","It","provides","prefetching","options","to","fetch","the","node","features","for","the","first","MFG","'s","``","srcdata","``",",","the","node","labels","for","the","last","MFG","'s","``","dstdata","``","and","the","edge","features","of","all","MFG","'s","``","edata","``",".","Parameters","--","--","--","--","--","prefetch_node_feats",":","list","[","str","]","or","dict","[","str",",","list","[","str","]","]",",","optional","The","node","data","to","prefetch","for","the","first","MFG",".","DGL","will","populate","the","first","layer","'s","MFG","'s","``","srcnodes","``","and","``","srcdata","``","with","the","node","data","of","the","given","names","from","the","original","graph",".","prefetch_labels",":","list","[","str","]","or","dict","[","str",",","list","[","str","]","]",",","optional","The","node","data","to","prefetch","for","the","last","MFG",".","DGL","will","populate","the","last","layer","'s","MFG","'s","``","dstnodes","``","and","``","dstdata","``","with","the","node","data","of","the","given","names","from","the","original","graph",".","prefetch_edge_feats",":","list","[","str","]","or","dict","[","etype",",","list","[","str","]","]",",","optional","The","edge","data","names","to","prefetch","for","all","the","MFGs",".","DGL","will","populate","every","MFG","'s","``","edges","``","and","``","edata","``","with","the","edge","data","of","the","given","names","from","the","original","graph",".","output_device",":","device",",","optional","The","device","of","the","output","subgraphs","or","MFGs",".","Default","is","the","same","as","the","minibatch","of","seed","nodes","."]
docstr: Generates a list of blocks from the given seed nodes.
  
  This function must return a triplet where the first element is the input node IDs
  for the first GNN layer (a tensor or a dict of tensors for heterogeneous graphs),
  the second element is the output node IDs for the last GNN layer, and the third
  element is the said list of blocks.
docstr_tok: ["Generates","a","list","of","blocks","from","the","given","seed","nodes",".","This","function","must","return","a","triplet","where","the","first","element","is","the","input","node","IDs","for","the","first","GNN","layer","(","a","tensor","or","a","dict","of","tensors","for","heterogeneous","graphs",")",",","the","second","element","is","the","output","node","IDs","for","the","last","GNN","layer",",","and","the","third","element","is","the","said","list","of","blocks","."]
code: def sample_blocks(self, g, seed_nodes, exclude_eids=None):
      """Generates a list of blocks from the given seed nodes.
  
      This function must return a triplet where the first element is the input node IDs
      for the first GNN layer (a tensor or a dict of tensors for heterogeneous graphs),
      the second element is the output node IDs for the last GNN layer, and the third
      element is the said list of blocks.
      """
      raise NotImplementedError
  
imports: import inspect
  from collections.abc import Mapping
  from ..None import backend
  from ..base import EID, NID
  from ..convert import heterograph
  from ..frame import LazyFeature
  from ..transforms import compact_graphs
  from ..utils import context_of, recursive_apply
label_desc: Use image node_id 2 for calling the BlockSampler obj's underlying member method code with example usage: obj.sample_blocks(g, seed_nodes, exclude_eids) without return types