code: def get_pred(self, logit, targets, context):
      (
          pos_similarity,
          neg_similarity,
          _sz,
      ) = PairwiseRankingLoss.get_similarities(logit)
      preds = pos_similarity > neg_similarity
      scores = pos_similarity - neg_similarity
      return preds, scores
  
imports: from pytext.config.component import create_loss
  from pytext.loss import PairwiseRankingLoss
  from .output_layer_base import OutputLayerBase
label_desc: Use image node_id 2 for calling the PairwiseRankingOutputLayer obj's underlying member method code with example usage: obj.get_pred(logit, targets, context) and returns: preds,  scores