code: def _loss(self):
      aff = (
          tf.reduce_sum(tf.multiply(self.outputs1, self.outputs2), 1)
          + self.outputs2_bias
      )
      neg_aff = (
          tf.matmul(self.outputs1, tf.transpose(self.neg_outputs))
          + self.neg_outputs_bias
      )
      true_xent = tf.nn.sigmoid_cross_entropy_with_logits(
          labels=tf.ones_like(aff), logits=aff
      )
      negative_xent = tf.nn.sigmoid_cross_entropy_with_logits(
          labels=tf.zeros_like(neg_aff), logits=neg_aff
      )
      loss = tf.reduce_sum(true_xent) + tf.reduce_sum(negative_xent)
      self.loss = loss / tf.cast(self.batch_size, tf.float32)
      tf.summary.scalar("loss", self.loss)
  
imports: from collections import namedtuple
  import tensorflow
  import math
  import graphsage.layers
  import graphsage.metrics
  from .prediction import BipartiteEdgePredLayer
  from .aggregators import MeanAggregator, MaxPoolingAggregator, MeanPoolingAggregator, SeqAggregator, GCNAggregator
label_desc: Use image node_id 5 for calling the Node2VecModel obj's underlying member method code with example usage: obj._loss() without return types