code: def cosine_similarity_scaled(
      list1: np.ndarray, list2: np.ndarray
  ) -> float:
      """
      Normalized cosine similarity for *normalized* embeddings.
  
      Normalized cosine similarity takes values from [0;1]
      """
      cosine_sim = np.dot(list1, list2) / (
          np.linalg.norm(list1) * np.linalg.norm(list2)
      )
      return (1.0 + cosine_sim) / 2.0
  
file_path: ParlAI/projects/roscoe/utils.py
imports: import numpy
  import os
  import pathlib
  from nltk.tokenize import sent_tokenize
  from typing import Callable, Dict, Iterable, List, Tuple
  import torch
label_desc: Use image node_id 3 for calling a global function with example usage: cosine_similarity_scaled(list1, list2) and returns: unknown