class_docstr: RedisGraph
class_docstr_tok: ["RedisGraph"]
docstr: predecessor
docstr_tok: ["predecessor"]
code: def predecessor(self, nodes, return_eids=False):
      """predecessor"""
      query = ["d:%s" % n for n in nodes]
      ret = hmget_helper(self._rs, query, self.num_parts)
      v = []
      eid = []
      for buff in ret:
          if buff is not None:
              npret = (
                  np.frombuffer(buff, dtype="int64")
                  .reshape([-1, 2])
                  .astype("int64")
              )
              v.append(npret[:, 0])
              eid.append(npret[:, 1])
          else:
              v.append(np.array([], dtype="int64"))
              eid.append(np.array([], dtype="int64"))
      if return_eids:
          return np.array(v), np.array(eid)
      else:
          return np.array(v)
  
imports: import pgl
  import redis
  from redis import BlockingConnectionPool, StrictRedis
  from redis._compat import b, unicode, bytes, long, basestring
  from rediscluster.nodemanager import NodeManager
  from rediscluster.crc import crc16
  from collections import OrderedDict
  import threading
  import numpy
  import time
  import json
  import pgl.graph
  import pickle
  from pgl.utils.logger import log
  import pgl.graph_kernel
label_desc: Use image node_id 12 for calling the RedisGraph obj's underlying member method code with example usage: obj.predecessor(nodes, return_eids) and returns: np,  np, np