code: def build_graph(self, x, y, label):
      single_input = x
      x, y = self.embed([x, y])
  
      with tf.variable_scope(tf.get_variable_scope(), reuse=True):
          tf.identity(self.embed(single_input), name="emb")
  
      cost = siamese_cosine_loss(x, y, label, scope="loss")
      cost = tf.identity(cost, name="cost")
      add_moving_summary(cost)
      return cost
  
imports: import argparse
  import numpy
  import tensorflow
  import tensorflow.contrib.slim
  from tensorpack import *
  from tensorpack.tfutils.summary import add_moving_summary
  from tensorpack.utils.gpu import change_gpu
  from embedding_data import MnistPairs, MnistTriplets, get_test_data
label_desc: Use image node_id 1 for calling the CosineModel obj's underlying member method code with example usage: obj.build_graph(x, y, label) and returns: cost