code: def doc_subgraph(G, doc_ids):
      sampler = dgl.dataloading.MultiLayerFullNeighborSampler(1)
      _, _, (block,) = sampler.sample(
          G.reverse(), {"doc": torch.as_tensor(doc_ids)}
      )
      B = dgl.DGLGraph(
          block._graph, ["_", "word", "doc", "_"], block.etypes
      ).reverse()
      B.nodes["word"].data["_ID"] = block.nodes["word"].data["_ID"]
      return B
  
imports: import collections
  import functools
  import io
  import os
  import warnings
  import dgl
  import numpy
  import scipy
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: doc_subgraph(G, doc_ids) and returns: B