code: def test_length_penalty_default():
      lengths = pt.tensor([[1], [2], [3]])
      length_penalty = sockeye.beam_search.LengthPenalty(1.0, 0.0)
      expected_lp = pt.tensor([[1.0], [2.0], [3.0]])
      pt.testing.assert_close(length_penalty(lengths), expected_lp)
  
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 1 for calling a global function with example usage: test_length_penalty_default() without return types