class_docstr: metapath_randomwalk test
      
code: def test_metapath_randomwalk(self):
      meta_path = "c2p-p2a-a2p-p2c"
      path = ["c", "p", "a", "p", "c"]
      start_nodes = [0, 1, 2, 3]
      walk_len = 10
      walks = metapath_randomwalk(
          graph=self.graph,
          start_nodes=start_nodes,
          metapath=meta_path,
          walk_length=walk_len,
      )
  
      self.assertEqual(len(walks), 4)
  
      for walk in walks:
          for i in range(len(walk)):
              idx = i % (len(path) - 1)
              self.assertEqual(self.node_types[walk[i]], path[idx])
  
file_path: PGL/legacy/pgl/tests/test_metapath_randomwalk.py
imports: import time
  import unittest
  import json
  import os
  import numpy
  from pgl.sample import metapath_randomwalk
  from pgl.graph import Graph
  from pgl import heter_graph
label_desc: Use image node_id 2 for calling the MetapathRandomwalkTest obj's underlying member method code with example usage: obj.test_metapath_randomwalk() without return types