code: def _get_sent_laser(
      hypothesis: List[str],
      references: List[List[str]],
      extra_args: Optional[Dict[str, str]] = None,
  ) -> List[float]:
      set_up()
  
      import laserembeddings
      import langid
      import logging
  
      logging.getLogger("langid").setLevel(logging.WARNING)
  
      n_samples = len(hypothesis)
      mid_idx = n_samples // 2
      hypo_lang = langid.classify(hypothesis[mid_idx])[0]
      ref_lang = langid.classify(references[0][mid_idx])[0]
  
      laser = laserembeddings.Laser()
      hypo_emb = laser.embed_sentences(hypothesis, lang=hypo_lang)
      ref_emb = laser.embed_sentences(references[0], lang=ref_lang)
  
      inner_product = np.sum(hypo_emb * ref_emb, axis=1)
      hypo_l2 = np.linalg.norm(hypo_emb, axis=1)
      ref_l2 = np.linalg.norm(ref_emb, axis=1)
      return (inner_product / (hypo_l2 * ref_l2)).tolist()
  
file_path: vizseq/vizseq/scorers/laser.py
imports: from typing import List, Optional, Dict
  import numpy
  from vizseq.scorers import register_scorer, VizSeqScorer, VizSeqScore
label_desc: Use image node_id 2 for calling a global function with example usage: _get_sent_laser(hypothesis, references, extra_args) and returns: unknown