code: def graph_saint_random_walk_sample(
      graph, nodes, max_depth, alias_name=None, events_name=None
  ):
      """Implement of graph saint random walk sample.
  
      First, this function will get random walks path for given nodes and depth.
      Then, it will create subgraph from all sampled nodes.
  
      Reference Paper: https://arxiv.org/abs/1907.04931
  
      Args:
          graph: A pgl graph instance
          nodes: Walk starting from nodes
          max_depth: Max walking depth
  
      Return:
          a subgraph of sampled nodes.
      """
      graph.outdegree()
      walks = deepwalk_sample(
          graph, nodes, max_depth, alias_name, events_name
      )
      sample_nodes = []
      for walk in walks:
          sample_nodes.extend(walk)
      sample_nodes = np.unique(sample_nodes)
      eids = extract_edges_from_nodes(graph, sample_nodes)
      subgraph = graph.subgraph(
          nodes=sample_nodes,
          eid=eids,
          with_node_feat=True,
          with_edge_feat=True,
      )
      subgraph.node_feat["index"] = np.array(
          sample_nodes, dtype="int64"
      )
      return subgraph
  
imports: import sys
  import time
  import copy
  import warnings
  import numpy
  import pgl
  from pgl import graph_kernel
  from pgl.utils.logger import log
label_desc: Use image node_id 14 for calling a global function with example usage: graph_saint_random_walk_sample(graph, nodes, max_depth, alias_name, events_name) and returns: subgraph