code: def get_multi_hop_neighbor(nodes, edge_types):
      """
      Get multi-hop neighbors with adjacent matrix.
  
      Args:
        nodes: A 1-D `tf.Tensor` of `int64`.
        edge_types: A list of 1-D `tf.Tensor` of `int32`. Specify edge types to
          filter outgoing edges in each hop.
  
      Return:
        A tuple of list: (nodes, adjcents)
          nodes: A list of N + 1 `tf.Tensor` of `int64`, N is the number of
            hops. Specify node set of each hop, including the root.
          adjcents: A list of N `tf.SparseTensor` of `int64`. Specify adjacent
            matrix between hops.
      """
      edge_types = [
          type_ops.get_edge_type_id(edge_type)
          for edge_type in edge_types
      ]
      nodes = tf.reshape(nodes, [-1])
      nodes_list = [nodes]
      adj_list = []
      for hop_edge_types in edge_types:
          neighbor, weight, _ = get_full_neighbor(nodes, hop_edge_types)
          next_nodes, next_idx = tf.unique(
              neighbor.values, out_idx=tf.int64
          )
          next_indices = tf.stack([neighbor.indices[:, 0], next_idx], 1)
          next_values = weight.values
          next_shape = tf.stack([tf.size(nodes), tf.size(next_nodes)])
          next_shape = tf.cast(next_shape, tf.int64)
          next_adj = tf.SparseTensor(
              next_indices, next_values, next_shape
          )
          next_adj = tf.sparse_reorder(next_adj)
          nodes_list.append(next_nodes)
          adj_list.append(next_adj)
          nodes = next_nodes
      return nodes_list, adj_list
  
file_path: euler/tf_euler/python/euler_ops/neighbor_ops.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from tf_euler.python.euler_ops import base
  from tf_euler.python.euler_ops import type_ops
label_desc: Use image node_id 11 for calling a global function with example usage: get_multi_hop_neighbor(nodes, edge_types) and returns: nodes_list,  adj_list