code: def test_predecessor(self):
      print()
      nodes = [11, 12, 13]
      e_type = "p2a"
      pre = self.graph.predecessor(
          edge_type=e_type,
          nodes=nodes,
      )
  
      self.assertIsInstance(pre, np.ndarray)
  
      print(pre)
      ground = [[4, 6, 7], [4, 6, 7], [4]]
      for succ, g in zip(pre, ground):
          self.assertIsInstance(succ, np.ndarray)
          self.assertCountEqual(succ, g)
  
      nodes = [11]
      e_type = "p2a"
      pre = self.graph.predecessor(
          edge_type=e_type,
          nodes=nodes,
      )
      print(pre)
  
      self.assertIsInstance(pre, np.ndarray)
      ground = [[4, 6, 7]]
      for p, g in zip(pre, ground):
          self.assertIsInstance(p, np.ndarray)
          self.assertCountEqual(p, g)
  
file_path: PGL/legacy/pgl/tests/test_MmapHeterGraph.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
  from pgl.heter_graph import MemmapHeterGraph
label_desc: Use image node_id 6 for calling the MmapHeterGraphTest obj's underlying member method code with example usage: obj.test_predecessor() without return types