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: Sample a list of blocks from the given seed nodes.
docstr_tok: ["Sample","a","list","of","blocks","from","the","given","seed","nodes","."]
code: def sample(
      self, g, seed_nodes, exclude_eids=None
  ):  # pylint: disable=arguments-differ
      """Sample a list of blocks from the given seed nodes."""
      result = self.sample_blocks(
          g, seed_nodes, exclude_eids=exclude_eids
      )
      return self.assign_lazy_features(result)
  
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 4 for calling the BlockSampler obj's underlying member method code with example usage: obj.sample(g, seed_nodes, exclude_eids) and returns: self