code: def get_graph_nbrhd_paths(train_graph, ent, exclude_tuple):
      """Helper to get neighbor (rels, ents) excluding a particular tuple."""
      es, er, et = exclude_tuple
      neighborhood = []
      for i in range(train_graph.max_path_length):
          if ent == es:
              paths = _proc_paths(
                  train_graph.paths[i][ent],
                  er,
                  et,
                  train_graph.max_path_length,
                  (train_graph.rel_pad, train_graph.ent_pad),
              )
          else:
              paths = _proc_paths(
                  train_graph.paths[i][ent],
                  max_length=train_graph.max_path_length,
                  pad=(train_graph.rel_pad, train_graph.ent_pad),
              )
          neighborhood += paths
      if not neighborhood:
          neighborhood = [[]]
      neighborhood = np.array(neighborhood, dtype=int)
      return neighborhood
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import clueweb_text_graph
  import numpy
  import tensorflow
label_desc: Use image node_id 6 for calling a global function with example usage: get_graph_nbrhd_paths(train_graph, ent, exclude_tuple) and returns: neighborhood