code: def test_brevity_penalty():
      hyp_lengths = pt.tensor([[1], [2], [3]])
      ref_lengths = pt.tensor([[7], [2], [91]])
      brevity_penalty = sockeye.beam_search.BrevityPenalty(3.5)
      expected_bp = pt.tensor(
          [[3.5 * (1 - 7 / 1)], [0.0], [3.5 * (1 - 91 / 3)]]
      )
      pt.testing.assert_close(
          brevity_penalty(hyp_lengths, ref_lengths), expected_bp
      )
  
imports: from typing import List, Optional
  from typing import Tuple
  import numpy
  import pytest
  import torch
  import numpy
  import sockeye.beam_search
  import sockeye.constants
  import sockeye.lexicon
  import sockeye.utils
label_desc: Use image node_id 5 for calling a global function with example usage: test_brevity_penalty() without return types