code: def produce_subgraph(self, n_id):
      n_id = tf.reshape(n_id, [-1])
      inv = tf.range(tf.size(n_id))
      last_idx = inv
  
      data_flow = DataFlow(n_id)
      n_neighbors, types, n_edge_src = self.get_neighbors(n_id)
      for i in range(len(self.metapath)):
          new_n_id = n_neighbors[i]
          edge_src = n_edge_src[i]
  
          new_n_id = tf.concat([new_n_id, n_id], axis=0)
          new_n_id, new_inv = tf.unique(new_n_id)
          res_n_id = new_inv[-tf.size(n_id) :]
  
          new_inv = new_inv[: -tf.size(n_id)]
          last_idx = new_inv
  
          n_id = new_n_id
          edge_dst = new_inv
          edge_index = tf.stack([edge_src, edge_dst], 0)
          e_id = types[i]
          data_flow.append(new_n_id, res_n_id, e_id, edge_index)
      return data_flow
  
file_path: euler/tf_euler/python/dataflow/relation_dataflow.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  import tf_euler
  from tf_euler.python.dataflow.base_dataflow import DataFlow
label_desc: Use image node_id 3 for calling the RelationDataFlow obj's underlying member method code with example usage: obj.produce_subgraph(n_id) and returns: data_flow