code: def build_graph(self):
      self.h = tf.placeholder(tf.int32, [None])
      self.t = tf.placeholder(tf.int32, [None])
      self.sign = tf.placeholder(tf.float32, [None])
  
      cur_seed = random.getrandbits(32)
      self.embeddings = tf.get_variable(
          name="embeddings" + str(self.order),
          shape=[self.node_size, self.rep_size],
          initializer=tf.contrib.layers.xavier_initializer(
              uniform=False, seed=cur_seed
          ),
      )
      self.context_embeddings = tf.get_variable(
          name="context_embeddings" + str(self.order),
          shape=[self.node_size, self.rep_size],
          initializer=tf.contrib.layers.xavier_initializer(
              uniform=False, seed=cur_seed
          ),
      )
      # self.h_e = tf.nn.l2_normalize(tf.nn.embedding_lookup(self.embeddings, self.h), 1)
      # self.t_e = tf.nn.l2_normalize(tf.nn.embedding_lookup(self.embeddings, self.t), 1)
      # self.t_e_context = tf.nn.l2_normalize(tf.nn.embedding_lookup(self.context_embeddings, self.t), 1)
      self.h_e = tf.nn.embedding_lookup(self.embeddings, self.h)
      self.t_e = tf.nn.embedding_lookup(self.embeddings, self.t)
      self.t_e_context = tf.nn.embedding_lookup(
          self.context_embeddings, self.t
      )
      self.second_loss = -tf.reduce_mean(
          tf.log_sigmoid(
              self.sign
              * tf.reduce_sum(
                  tf.multiply(self.h_e, self.t_e_context), axis=1
              )
          )
      )
      self.first_loss = -tf.reduce_mean(
          tf.log_sigmoid(
              self.sign
              * tf.reduce_sum(tf.multiply(self.h_e, self.t_e), axis=1)
          )
      )
      if self.order == 1:
          self.loss = self.first_loss
      else:
          self.loss = self.second_loss
      optimizer = tf.train.AdamOptimizer(0.001)
      self.train_op = optimizer.minimize(self.loss)
  
imports: from __future__ import print_function
  import random
  import math
  import numpy
  from sklearn.linear_model import LogisticRegression
  import tensorflow
  from .classify import Classifier, read_node_label
label_desc: Use image node_id 2 for calling the _LINE obj's underlying member method code with example usage: obj.build_graph() without return types