code: def test_get_vocab_slice_ids_blocking():
      # test _get_vocab_slice_ids when using a blocking lexicon.
      restrict_lexicon = sockeye.lexicon.StaticBlockLexicon(
          np.array([3])
      )
      source_words = pt.tensor([1, 2, 3])
      vocab_slice_ids, _ = sockeye.beam_search._get_vocab_slice_ids(
          restrict_lexicon=restrict_lexicon,
          source_words=source_words,
          eos_id=C.EOS_ID,
          beam_size=5,
          target_prefix=None,
          output_vocab_size=6,
      )
      expected_vocab_slice_ids = pt.tensor(
          [0, 1, 2, 4, 5, C.EOS_ID, C.EOS_ID, C.EOS_ID]
      )
      pt.testing.assert_close(vocab_slice_ids, expected_vocab_slice_ids)
  
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 15 for calling a global function with example usage: test_get_vocab_slice_ids_blocking() without return types