code: def get_norm_cosine_scores(cosine_sim_scores):
      # Min-max normalization. It's monotonic in nature and hence doesn't change
      # score distribution.
      pos_scores = (cosine_sim_scores + 1.0) / 2.0
      neg_scores = 1.0 - pos_scores
      return pos_scores, neg_scores
  
imports: from enum import IntEnum, unique
  from typing import Any, Dict, List, Optional, Tuple, Union
  import torch
  import torch.nn.functional
  from pytext.config.component import create_loss
  from pytext.data.utils import Vocabulary
  from pytext.fields import FieldMeta
  from pytext.loss import BinaryCrossEntropyLoss, CosineEmbeddingLoss, MAELoss, MSELoss, NLLLoss
  from pytext.models.output_layers.output_layer_base import OutputLayerBase
  from pytext.utils.label import get_label_weights
  from pytext.utils.usage import log_class_usage
label_desc: Use image node_id 1 for calling a global function with example usage: get_norm_cosine_scores(cosine_sim_scores) and returns: pos_scores,  neg_scores