code: def test_rerank_return_score(
      source, hypotheses, reference, expected_scores
  ):
      reranker = rerank.Reranker(
          metric="bleu", isometric_alpha=0.5, return_score=True
      )
      hypotheses = {
          "sentence_id": 0,
          "text": source,
          "translation": "",
          "translations": hypotheses,
      }
      reranked_hypotheses = reranker.rerank(hypotheses, reference)
      assert "scores" in reranked_hypotheses
      actual_scores = reranked_hypotheses["scores"]
      assert np.allclose(actual_scores, expected_scores)
  
imports: import numpy
  import pytest
  import sockeye.rerank
label_desc: Use image node_id 3 for calling a global function with example usage: test_rerank_return_score(source, hypotheses, reference, expected_scores) without return types